[PATCH v2] Fix POSIX compliance: Make blkcnt_t and blksize_t signed on alpha
Osama Abdelkader
osama.abdelkader@gmail.com
Sun Nov 23 14:27:14 GMT 2025
POSIX requires that blkcnt_t and blksize_t are signed integer types.
On alpha, these were incorrectly defined as unsigned types (__U32_TYPE).
This change makes them signed (__S32_TYPE) to match:
- POSIX requirements
- All other architectures in glibc
Fixes #33355
Suggested-by: Collin Funk <collin.funk@gmail.com>
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
---
v2: Use __S32_TYPE instead of __SLONGWORD_TYPE
---
sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
index 8cc4491c0b..4a7d689123 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
@@ -38,7 +38,7 @@
#define __PID_T_TYPE __S32_TYPE
#define __RLIM_T_TYPE __ULONGWORD_TYPE
#define __RLIM64_T_TYPE __U64_TYPE
-#define __BLKCNT_T_TYPE __U32_TYPE
+#define __BLKCNT_T_TYPE __S32_TYPE
#define __BLKCNT64_T_TYPE __U64_TYPE
#define __FSBLKCNT_T_TYPE __S32_TYPE
#define __FSBLKCNT64_T_TYPE __S64_TYPE
@@ -54,7 +54,7 @@
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
-#define __BLKSIZE_T_TYPE __U32_TYPE
+#define __BLKSIZE_T_TYPE __S32_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
--
2.43.0
More information about the Libc-alpha
mailing list