[PATCH v6 2/2] Define __STATFS_MATCHES_STATFS64
Joseph Myers
joseph@codesourcery.com
Tue Oct 22 22:33:00 GMT 2019
On Tue, 22 Oct 2019, Alistair Francis wrote:
> On a 32-bit platform with a 64-bit ino_t type (__STATFS_MATCHES_STATFS64
> == 1)
The commit message should not talk about ino_t; the types in this
structure are nothing to do with ino_t, even if in fact it happens that
they do match.
> diff --git a/sysdeps/mach/hurd/bits/typesizes.h b/sysdeps/mach/hurd/bits/typesizes.h
> index c30de12d1d4..e4c975ebd07 100644
> --- a/sysdeps/mach/hurd/bits/typesizes.h
> +++ b/sysdeps/mach/hurd/bits/typesizes.h
> @@ -64,5 +64,11 @@
> /* Number of descriptors that can fit in an `fd_set'. */
> #define __FD_SETSIZE 256
>
> +/* Tell the libc code that fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and
> + fsfilcnt64_t are actually the same type for all ABI purposes, even
> + if possibly expressed as different base types for C type-checking
> + purposes. */
> +# define __STATFS_MATCHES_STATFS64 1
I don't believe that's accurate. __FSBLKCNT_T_TYPE is __ULONGWORD_TYPE
but __FSBLKCNT64_T_TYPE is __UQUAD_TYPE, for example (and the only
existing Hurd port is 32-bit, so the types never match for Hurd at
present, so an unconditional 0 would be OK for the definition there right
now).
> diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
> index 20231152e33..5eb96f9a1e7 100644
> --- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
> +++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
> @@ -69,6 +69,9 @@
> /* And for __rlim_t and __rlim64_t. */
> #define __RLIM_T_MATCHES_RLIM64_T 1
>
> +/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
> +# define __STATFS_MATCHES_STATFS64 1
This is also inaccurate; alpha, despite being a 64-bit architecture, uses
a 32-bit statfs by default.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list