gnulib/vasprintf: handle unsigned modifier for long long
authorAurélien Zanelli <aurelien.zanelli@parrot.com>
Tue, 3 Feb 2015 14:41:05 +0000 (15:41 +0100)
committerColin Walters <walters@verbum.org>
Tue, 3 Feb 2015 16:48:18 +0000 (11:48 -0500)
Otherwise, an unsigned integer will be displayed as a signed one if we
use internal printf and if HAVE_LONG_LONG_FORMAT is not defined.

https://bugzilla.gnome.org/show_bug.cgi?id=743936

glib/gnulib/vasnprintf.c

index ee0a43a..018e0d9 100644 (file)
@@ -123,6 +123,11 @@ print_long_long (char *buf,
       digits = upper;
       negative = FALSE;
       break;
+    case 'u':
+      base = 10;
+      digits = lower;
+      negative = FALSE;
+      break;
     default:
       base = 10;
       digits = lower;