[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
printf-parse: Handle a PRIdMAX value of "qd" (for MacOS X 10.3).
From: |
Jim Meyering |
Subject: |
printf-parse: Handle a PRIdMAX value of "qd" (for MacOS X 10.3). |
Date: |
Tue, 08 Jan 2008 18:24:02 +0100 |
I have mixed feelings about this patch.
Sure, it probably works, but adding support for the non-standard
%qd specifier seems wrong. Maybe it'd be better to make
gt_INTTYPES_PRI declare such a PRIdMAX value invalid and to
provide a replacement definition.
Suggestions?
2008-01-08 Jim Meyering <address@hidden>
printf-parse.c: handle a PRIdMAX value of "qd" (for MacOS X 10.3).
* lib/printf-parse.c (PRINTF_PARSE): Treat 'q' like 'll'.
Reported by Peter Fales in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12132
diff --git a/lib/printf-parse.c b/lib/printf-parse.c
index e3aa95a..2f9e47e 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,6 +347,12 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d,
arguments *a)
flags += 8;
cp++;
}
+ else if (*cp == 'q')
+ {
+ /* a 64-bit type */
+ flags += 16;
+ cp++;
+ }
else if (*cp == 'j')
{
if (sizeof (intmax_t) > sizeof (long))
--
1.5.4.rc2.61.g6ed4e
- printf-parse: Handle a PRIdMAX value of "qd" (for MacOS X 10.3).,
Jim Meyering <=