This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v6 2/2] Define __STATFS_MATCHES_STATFS64
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair dot francis at wdc dot com>
- Cc: <libc-alpha at sourceware dot org>, <alistair23 at gmaill dot com>
- Date: Tue, 22 Oct 2019 22:32:54 +0000
- Subject: Re: [PATCH v6 2/2] Define __STATFS_MATCHES_STATFS64
- Ironport-sdr: GWK2kx2OhhoAY/l/bA45AS+D+ZeTOLRJ3iTKP55/6urxXyR/O9S0pcFT9eqpTZu/vL0BQ5nrVP cYK7GWmrHIeUw72fEy4bxEUFLIEepO1g6DuB14ikJZvzCMg6IOrmUjhwlyOTbdScNcmTRdUKax bNXBxQGbQx4hiJwuyr9PB+1EsNVuvFbg+hgCqz8JlvVTO5fj+ki3QNJi5VgolcZY+BuOmZxQHs IKdhsbLDiqcdVS3VAK1/vGwKp96qHFtsjcATYM/ENFH7LxNN9lhGWs+0U5XHLGZ8YVJyMjCmLq 680=
- Ironport-sdr: iYFjWM0VLWCbQkjDr6I7Tj4lH2bdLrzAqUT7iqzCFJ3jCX8RREKeAPq5q9m5Qb63pftqyG1wgF A5ctoBgGJzLqs7BFiY/iLjwJrDuEzz0m/NkUy8WOCW+N8GFHIz0PtNmyaFCwSXI3Z38hWIOCIM zAF2IoekDqp3/fFeoo113LVB2uHbiod0iZ5DIJ8+W4Kz/lnSl5OqKpXgJRsrDVL/rpS0XsqA8J oNXZ9NTvMqwHhSF5vCDS1Wsks73ZXzgnZbt21SG9X5PV7qqLa8BHYQ0laeWu61lEFIG7W//iaf JK4=
- References: <20191022155921.8697-1-alistair.francis@wdc.com> <20191022155921.8697-2-alistair.francis@wdc.com>
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