]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
sys_types-h tests: Fix a static_assert failure on glibc/hppa.
authorCollin Funk <collin.funk1@gmail.com>
Mon, 1 Sep 2025 21:01:36 +0000 (14:01 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 1 Sep 2025 21:01:36 +0000 (14:01 -0700)
* tests/test-sys_types-h.c [__GLIBC__ && __hppa]: Don't check that
blksize_t and blkcnt_t are signed.
* doc/posix-headers/sys_types.texi: Mention that these types are
unsigned on this platform.

ChangeLog
doc/posix-headers/sys_types.texi
tests/test-sys_types-h.c

index 60e33403090b4f249da55e2049697db4cb1de996..fba408e498a51e2ece49bb0a13a864d045911494 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2025-09-01  Collin Funk  <collin.funk1@gmail.com>
 
+       sys_types-h tests: Fix a static_assert failure on glibc/hppa.
+       * tests/test-sys_types-h.c [__GLIBC__ && __hppa]: Don't check that
+       blksize_t and blkcnt_t are signed.
+       * doc/posix-headers/sys_types.texi: Mention that these types are
+       unsigned on this platform.
+
        sys_stat-h tests: Fix a static_assert failure on glibc/hppa.
        Reported by Santiago Vila <sanvila@debian.org> in:
        <https://lists.gnu.org/archive/html/bug-m4/2025-09/msg00000.html>.
index ed301c4b2c4c488dfb9789fd266ceafa7758c1c9..90b8a60fdb78a89fdac258bce83c1fcc3860c5ef 100644 (file)
@@ -44,7 +44,7 @@ Portability problems not fixed by Gnulib:
 @itemize
 @item
 On some platforms the types @code{blksize_t} and @code{blkcnt_t} are unsigned:
-Android.
+Android, glibc/HPPA.
 @item
 On some platforms the types @code{blksize_t} and @code{suseconds_t}
 are signed integer types that are wider than @code{long}:
index 2a64fb21cf185b987fad3989f1720bfadfd8f86f..9fe0f92884e02863280de2685b7e8012716f0f4d 100644 (file)
@@ -46,12 +46,14 @@ static_assert (TYPE_SIGNED (off_t));
 static_assert (TYPE_SIGNED (off64_t));
 
 /* POSIX requires that blksize_t is a signed integer type.  */
-#if !(defined __ANDROID__ || (defined __FreeBSD_kernel__ && !defined __FreeBSD__))
+#if !(defined __ANDROID__ \
+      || (defined __FreeBSD_kernel__ && !defined __FreeBSD__) \
+      || defined __GLIBC__ && defined __hppa)
 static_assert (TYPE_SIGNED (blksize_t));
 #endif
 
 /* POSIX requires that blkcnt_t is a signed integer type.  */
-#if !defined __ANDROID__
+#if !(defined __ANDROID__ || defined __GLIBC__ && defined __hppa)
 static_assert (TYPE_SIGNED (blkcnt_t));
 #endif