[PATCH v3] Fix POSIX compliance: Make blkcnt_t and blksize_t signed on alpha

Yury Khrustalev yury.khrustalev@arm.com
Wed Nov 26 09:55:29 GMT 2025


On Tue, Nov 25, 2025 at 11:03:44PM +0200, Osama Abdelkader wrote:
> On Mon, Nov 24, 2025 at 08:09:21PM +0000, Joseph Myers wrote:
> > On Sun, 23 Nov 2025, Osama Abdelkader wrote:
> > 
> > > POSIX requires that blkcnt_t and blksize_t are signed integer types.
> > > On alpha, these were incorrectly defined as unsigned types.
> > > This change makes them signed to match:
> > > - POSIX requirements
> > > - All other architectures in glibc

I think that other targets define these types slightly in bits/typesizes.h.

> > > 
> > > Fixes #33355
> > 
> > How has this been tested?  I'd have expected c++-types-check to fail 
> > because it verified the mangling of various types, including these ones, 
> > hasn't accidentally changed.

Thanks, I agree this should be fixed as well.

> 
> Thanks for the review, yes we need to update the expected data
> sysdeps/unix/sysv/linux/alpha/c++-types.data:
> 
> -blkcnt_t:j
> -blksize_t:j
> +blkcnt_t:l
> +blksize_t:l
> 
> -fsblkcnt_t:i
> +fsblkcnt_t:m

I think it should be 

  blkcnt64_t:l // long for __S64_TYPE
  blkcnt_t:i   // int for __S32_TYPE
  blksize_t:i  // int for __S32_TYPE

given the new definitions of these types?

Otherwise, this patch looks OK. I'm happy to review v4.

Thanks,
Yury



More information about the Libc-alpha mailing list