bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf-parse: Handle a PRIdMAX value of "qd" (for MacOS X 10.3).


From: Paul Eggert
Subject: Re: printf-parse: Handle a PRIdMAX value of "qd" (for MacOS X 10.3).
Date: Tue, 08 Jan 2008 13:58:39 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Jim Meyering <address@hidden> writes:

> 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.

Another possibility (though this will require a bit more contortion,
to get access PRIdMAX) is to change the test from:

                  else if (*cp == 'q')

to:

                  else if (PRIdMAX[0] == 'q' && *cp == 'q')

That way, with a decent optimizing compiler we won't add support (and
runtime overhead) for the nonstandard specifier except on platforms
that seem to require it.

If that idea doesn't work for you, I mildly prefer just installing the
patch with 'q' and stopping there, since that works and it's simple.
There is some precedent for supporting nonstandard extensions, e.g.,
the code already supports 'Z'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]