]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't traverse the same va_list twice - does not work on x86_64.
authorBruno Haible <bruno@clisp.org>
Mon, 24 Sep 2007 23:03:55 +0000 (23:03 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:05 +0000 (12:15 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/vasprintf.c
gnulib-local/modules/vasprintf.diff

index 6e42326886a20b9cdd5c3d9ca5fb0a7ef786354e..1bc49c4b4435d2d4002ceebe9dffebac20bc31c1 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-24  Bruno Haible  <bruno@clisp.org>
+
+       * lib/vasprintf.c (int_vasprintf): Use va_copy.
+       * modules/vasprintf.diff: Add dependency to stdarg.
+       Reported by Cristian Baboi <cristi@ot.onrc.ro>.
+
 2007-09-01  Bruno Haible  <bruno@clisp.org>
 
        * lib/linebreak.c.diff: Update.
index ba42506b047a5bb4ed3d0fa81401997059260d1c..0faa9f6a91528e5f708dcab7dbe2a7cc00d5b5cf 100644 (file)
@@ -38,8 +38,9 @@ int_vasprintf (char **result, const char *format, va_list *args)
   /* Add one to make sure that it is never zero, which might cause malloc
      to return NULL.  */
   size_t total_width = strlen (format) + 1;
-  va_list ap = *args;
+  va_list ap;
 
+  va_copy (ap, *args);
   while (*p != '\0')
     {
       if (*p++ == '%')
index 560fdf4954962d6d9c3daccf0d26ec381852a39d..2769843dda605db2aeef72380ebaa2db97cd5e96 100644 (file)
@@ -1,7 +1,7 @@
-*** vasprintf.orig     2007-03-27 22:18:12.000000000 +0200
---- vasprintf  2007-05-13 18:48:37.000000000 +0200
+*** vasprintf.orig     2007-09-19 00:04:41.000000000 +0200
+--- vasprintf  2007-09-25 00:54:11.000000000 +0200
 ***************
-*** 3,13 ****
+*** 3,14 ****
   
   Files:
   lib/vasprintf.c
@@ -9,8 +9,20 @@
   m4/vasprintf.m4
   
   Depends-on:
-- vasnprintf
+  extensions
+! vasnprintf
+  stdio
+  
+  configure.ac:
+--- 3,13 ----
+  
+  Files:
+  lib/vasprintf.c
+  m4/vasprintf.m4
+  
+  Depends-on:
+  extensions
+! stdarg
   stdio
   
   configure.ac:
---- 3,11 ----