]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
sys_stat-h tests: Fix a static_assert failure on glibc/hppa.
authorCollin Funk <collin.funk1@gmail.com>
Mon, 1 Sep 2025 21:00:00 +0000 (14:00 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 1 Sep 2025 21:00:00 +0000 (14:00 -0700)
Reported by Santiago Vila <sanvila@debian.org> in:
<https://lists.gnu.org/archive/html/bug-m4/2025-09/msg00000.html>.

* tests/test-sys_stat-h.c [__GLIBC__ && __hppa]: Don't check that
blksize_t and blkcnt_t are signed.
* doc/posix-headers/sys_stat.texi: Mention that these types are
unsigned on this platform.

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

index d8950512dbbd2c592c7796559f5a0725f8b49a2b..60e33403090b4f249da55e2049697db4cb1de996 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-09-01  Collin Funk  <collin.funk1@gmail.com>
+
+       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>.
+       * tests/test-sys_stat-h.c [__GLIBC__ && __hppa]: Don't check that
+       blksize_t and blkcnt_t are signed.
+       * doc/posix-headers/sys_stat.texi: Mention that these types are
+       unsigned on this platform.
+
 2025-09-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        tests: more fixes for AT_FDCWD portability
index 764451255f2c5abc721fe5f6aac007cfed375623..1369cbb76887adb27ac8a0089e141cf24a3a63ba 100644 (file)
@@ -61,7 +61,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
 The macro @code{S_IFBLK} is missing on some platforms:
 MSVC 14.
index 9c8ceb7c7c920866f7f1511348d4cbac20baeea6..0979f037799cea1918e59d68d3b496e6551db0b7 100644 (file)
@@ -339,12 +339,14 @@ struct timespec st;
 static_assert (TYPE_SIGNED (off_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