[PATCH] powerpc/32: Remove powerpc specific definition of 'ptrdiff_t'

Segher Boessenkool segher at kernel.crashing.org
Mon Apr 5 22:38:27 AEST 2021


On Mon, Apr 05, 2021 at 09:57:27AM +0000, Christophe Leroy wrote:
> For unknown reason, old commit d27dfd388715 ("Import pre2.0.8")
> changed 'ptrdiff_t' from 'int' to 'long'.
> 
> GCC expects it as 'int' really,

It isn't actually defined in the ABI as far as I can see (neither the
old document or the new one), but GCC has defined it as "int" since
forever (which was in 1995), for anything using the SYSV ABI (which
includes powerpc-linux).

> <asm-generic/uapi/posix-types.h> defines it as 'int', and
> defines 'size_t' and 'ssize_t' exactly as powerpc do, so
> remove the powerpc specific definitions and fallback on
> generic ones.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>

Thanks!

Acked-by: Segher Boessenkool <segher at kernel.crashing.org>


Segher


More information about the Linuxppc-dev mailing list