------- Comment #1 from mark at easterbrook dot org dot uk 2008-12-23 10:51 ------- The follow fixes it. Tested on several Solaris variants:
Patch to libiberty/vasprintf.c: *** 79,84 **** --- 79,85 ---- { if (*p++ == '%') { + int longs = 0; while (strchr ("-+ #0", *p)) ++p; if (*p == '*') *************** *** 100,106 **** --- 101,111 ---- total_width += strtoul (p, (char **) &p, 10); } while (strchr ("hlL", *p)) + { + if (*p=='l' || *p=='L') + longs++; ++p; + } /* Should be big enough for any format specifier except %s and floats. */ total_width += 30; switch (*p) *************** *** 112,118 **** case 'x': case 'X': case 'c': ! (void) va_arg (ap, int); break; case 'f': case 'e': --- 117,128 ---- case 'x': case 'X': case 'c': ! if (longs == 0) ! (void) va_arg (ap, int); ! else if (longs == 1) ! (void) va_arg (ap, long); ! else ! (void) va_arg (ap, long long); break; case 'f': case 'e': -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37080