GNU bug report logs - #24311
[PATCH] maint: accommodate LP64 systems

Previous Next

Package: diffutils;

Reported by: Peter Rosin <peda <at> lysator.liu.se>

Date: Fri, 26 Aug 2016 08:43:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 24311 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Peter Rosin <peda <at> lysator.liu.se>, 24311 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#24311: [PATCH] maint: accommodate LP64 systems
Date: Fri, 26 Aug 2016 15:24:02 -0700
On 08/26/2016 02:59 PM, Peter Rosin wrote:
> Feels designed to target 64-bit Windows.

It isn't. It's more the other way round. The Unix (and GNU) LP64 
tradition came first, and the 64-bit MS-Windows designers made it hard 
to write 64-bit code that is portable among the platforms.

> Do you, or do you not require c99?

It's not that simple. Although many GNU apps (including diffutils, I 
expect) assume some C99 features, they are typically portable to 
less-than-perfect POSIXish implementations that don't have all features 
that C99 requires.

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.

> the POSIX part seems to be connected to c99, but what do I know?

POSIX assumes C99 or later nowadays.

> Besides, I thought the gnulib inttypes module (or whatever it's called)
> provided the PRI?PTR macros if missing/broken?

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.




This bug report was last modified 8 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.