With Jim's proposed patch below, all the gnulib tests pass on Darwin 10.3.
On Mon, Jan 07, 2008 at 11:47:53PM +0100, Jim Meyering wrote: > Peter Fales <[EMAIL PROTECTED]> wrote: > > > I'm trying to build coreutils-6.9.91 for Mac OS/X (Darwin 10.3) > > and getting test failures from misc/printf. The output of make check > > is attached below. I believe the problem occurs around line 345 of > > src/printf.c which has: > > > > 342 switch (conversion) > > 343 { > > 344 case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': > > 345 length_modifier = PRIdMAX; > > 346 length_modifier_len = sizeof PRIdMAX - 2; > > 347 break; > > > > On linux PRIdMAX is defined as "lld" but on darwin it is defined as "qd". > > Later on in the block of code around line 331 in lib/parse-printf.c, the > > 'q' case is not handled. > > > > Here's the test log: > > > > make check-TESTS > > make[1]: Entering directory > > `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' > > make[2]: Entering directory > > `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' > > FAIL: printf.log > > Based on your diagnosis, maybe this patch solves the problem? > [beware: I haven't investigated enough to know if 'qd' goes where > this patch puts it, or if it goes with the 'l' a few lines above] > > diff --git a/lib/printf-parse.c b/lib/printf-parse.c > index e3aa95a..4b95cb9 100644 > --- a/lib/printf-parse.c > +++ b/lib/printf-parse.c > @@ -1,5 +1,5 @@ > /* Formatted output to strings. > - Copyright (C) 1999-2000, 2002-2003, 2006-2007 Free Software Foundation, > Inc. > + Copyright (C) 1999-2000, 2002-2003, 2006-2008 Free Software Foundation, > Inc. > > This program is free software; you can redistribute it and/or modify > it under the terms of the GNU General Public License as published by > @@ -347,7 +347,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, > arguments *a) > flags += 8; > cp++; > } > - else if (*cp == 'j') > + else if (*cp == 'j' || *cp == 'q') > { > if (sizeof (intmax_t) > sizeof (long)) > { -- Peter Fales Alcatel-Lucent Member of Technical Staff 2000 Lucent Lane Room: 1C-436 Naperville, IL 60566-7033 Email: [EMAIL PROTECTED] Phone: 630 979 8031 _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils