Subject: Re: [bug-diffutils] bug#24311: [PATCH] maint: accommodate LP64 systems

From: Peter Rosin <[email-masked]>
Date: Sun, 28 Aug 2016 00:49:06 +0200

On 2016-08-27 00:24, Paul Eggert wrote:
> The main sticking point in this particular case is support for printf 
> formats like %td. This requires library support, which in practice 
> trails behind compiler support. We can reasonably ask people to use a 
> C99ish compiler even when running on older platforms (just install GCC). 
> It hasn't been so easy to insist on a C99ish C library.

*snip*

> PRI?PTR are not the right macros to use here. The values in question are 
> of type ptrdiff_t, and ptrdiff_t != intptr_t on some (admittedly 
> unusual) platforms.

Are you trying to argue that there exist some non-theoretical system,
where it's useful to actually run diffutils, and where both

    intptr_t < long int           and
    intptr_t < ptrdiff_t

holds?     (i.e. a system that would regress with the patch)

Because if there is no such system, then PRIdPTR w/ intptr_t will work
better than %ld w/ long int (pending the time when %td w/ ptrdiff_t is
generally available).

Cheers,
Peter