From: Collin Funk Date: Mon, 1 Sep 2025 21:00:00 +0000 (-0700) Subject: sys_stat-h tests: Fix a static_assert failure on glibc/hppa. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1087a1576f1de2df8f7c1badf847ecaf63d08081;p=thirdparty%2Fgnulib.git sys_stat-h tests: Fix a static_assert failure on glibc/hppa. Reported by Santiago Vila in: . * 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. --- diff --git a/ChangeLog b/ChangeLog index d8950512db..60e3340309 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2025-09-01 Collin Funk + + sys_stat-h tests: Fix a static_assert failure on glibc/hppa. + Reported by Santiago Vila in: + . + * 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 tests: more fixes for AT_FDCWD portability diff --git a/doc/posix-headers/sys_stat.texi b/doc/posix-headers/sys_stat.texi index 764451255f..1369cbb768 100644 --- a/doc/posix-headers/sys_stat.texi +++ b/doc/posix-headers/sys_stat.texi @@ -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. diff --git a/tests/test-sys_stat-h.c b/tests/test-sys_stat-h.c index 9c8ceb7c7c..0979f03779 100644 --- a/tests/test-sys_stat-h.c +++ b/tests/test-sys_stat-h.c @@ -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