Jim Meyering <[EMAIL PROTECTED]> wrote:

> Paul Eggert <[EMAIL PROTECTED]> wrote:
>
>> Pádraig Brady <[EMAIL PROTECTED]> writes:
>>
>>> Yes I suppose %z and PRIdMAX are C99 specific.
>>
>> %z is C99 specific, and should not be relied on, but PRIdMAX is fine,
>> since the inttypes module backports PRIdMAX to older hosts.
>>
>> More generally, there's not that much use for imaxtostr nowadays,
>> since the inttypes module and newer versions of gettext allow things
>> like _("truncating %s at %" PRIdMAX " bytes") to work portably.
>> I suspect that (if someone cares to take the time) we can remove
>> all instances of imaxtostr and umaxtostr in coreutils and gnulib.
>
> Good point.
> I've just added your second paragraph to TODO.

Well, it sounded good.
However, a quick survey suggests that none of the imaxtostr uses
should be removed/replaced.
On the other hand, several of the umaxtostr uses do look
like they'd be easy to eliminate, at least where there is
already a use of some *printf function.

Using umaxtostr makes good sense in a library context like userspec.c
where the dependency/size/overhead of using a *printf function would
be unwelcome.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to