Make long long printing work if snprintf is not available. (#332841,
authorMatthias Clasen <mclasen@redhat.com>
Wed, 5 Apr 2006 15:06:15 +0000 (15:06 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 5 Apr 2006 15:06:15 +0000 (15:06 +0000)
2006-04-05  Matthias Clasen  <mclasen@redhat.com>

* glib/gnulib/vasnprintf.c (vasnprintf): Make
long long printing work if snprintf is not
available.  (#332841, Michael McDonald)

ChangeLog
ChangeLog.pre-2-12
glib/gnulib/vasnprintf.c

index b047a8b..068e931 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-05  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gnulib/vasnprintf.c (vasnprintf): Make
+       long long printing work if snprintf is not 
+       available.  (#332841, Michael McDonald)
+
 2006-04-05  Behdad Esfahbod  <behdad@gnome.org>
 
        * tests/option-test.c: Check the return value of g_get_prgname for
index b047a8b..068e931 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-05  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gnulib/vasnprintf.c (vasnprintf): Make
+       long long printing work if snprintf is not 
+       available.  (#332841, Michael McDonald)
+
 2006-04-05  Behdad Esfahbod  <behdad@gnome.org>
 
        * tests/option-test.c: Check the return value of g_get_prgname for
index b95e119..1b46800 100644 (file)
@@ -853,11 +853,19 @@ vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
                                }
                            }
                          
-                         count = print_long_long (result + length, maxlen,
+#if HAVE_SNPRINTF
+                         count = print_long_long (result + length, maxlen,
+                                                  width, precision,
+                                                  dp->flags,
+                                                  dp->conversion,
+                                                  arg);
+#else
+                         count = print_long_long (tmp, tmp_length,
                                                   width, precision,
                                                   dp->flags,
                                                   dp->conversion,
                                                   arg);
+#endif
                        }
                        break;
 #else