This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4 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: Fri, 18 Oct 2019 15:13:45 +0000
- Subject: Re: [PATCH v4 2/2] Define __STATFS_MATCHES_STATFS64
- Ironport-sdr: eRDRcvYUaq9VlhSMgzLmZju/z+/0whkZATScXHCI0dc18F+7PJjhoIvSNn43Cv83iW5bggVQ+I uvPee0Jgyvzcb3S42h/bIys+j8ey2fb8S7LlTt/JwW+UTvRICFJ2YP6NP83uYH3WYVQxqAvjrg rZ7KDu7S3H1/pN3heOZH9iiTz1jo5BW+KgPu8i8CkoCUkKLGzVDYxDdwuE0ZG9p/zf6vtty+ZU +32Beb+o/1mI+tegXX19Q9v4QgwS2Or98E1WcEaIDazJuwBUWYss+jZEuDQc3cTx9gFnjSm52I aoo=
- Ironport-sdr: W3PJ+x1nbI6EPr2mxqbmsLV4yS9l2SUqhqgohz/+eDk98G+IQFE/k4Q0+3cKHYnO2U8E+lejtM /A+uA0qmINKSWCjgTum7tVAy6/TdQqwwRKFFG32PAWHF1HypGav4zEa6IdIpcPEQAmRiz2HLAG kW87htlgobdASZ6Gdv5DZTm2BmRn9q0eSETNXDlTeNeVCUQlAzTToUnP1os7rIy4eIhyipgx9U fvRX9yYybtBYhqgnjUH/W46/q9zJSwxxyMXKRcP1VrJ/PrBQFDfGC6WLZOfZxUvlJrYDsr0Y9f 0z8=
- References: <20191016234407.4306-1-alistair.francis@wdc.com> <20191016234407.4306-2-alistair.francis@wdc.com>
On Wed, 16 Oct 2019, Alistair Francis wrote:
> Add a new macro __STATFS_MATCHES_STATFS64 that specifies if fsblkcnt_t
> matches fsblkcnt64_t and if fsfilcnt_t matches fsfilcnt64_t.
>
> On a 32-bit platform with a 64-bit ino_t type (__STATFS_MATCHES_STATFS64
> == 1) we want to update the statfs struct to remove the padding as it
> isn't required. As we don't have the padding we also need to update the
> overflow checker to not access the undefined members.
>
> * bits/typesizes.h: Define __STATFS_MATCHES_STATFS64 to handle
> 64-bit __fsblkcnt_t and __fsfilcnt_t types on 32-bit hosts.
> * sysdeps/unix/sysv/linux/generic/bits/statfs.h: Likewise.
> * sysdeps/unix/sysv/linux/generic/bits/typesizes.h: Likewise.
> * sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h: Likewise.
> * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Likewise.
> * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: Likewise.
> * sysdeps/unix/sysv/linux/x86/bits/typesizes.h: Likewise.
Note that you no longer need to write ChangeLog entries.
I don't follow the logic for which bits/typesizes.h headers you're
updating. You're updating some for architectures not using linux/generic,
which I think is the right thing to do - make them provide the defined
API, whether or not they currently use any code that actually tests the
__STATFS_MATCHES_STATFS64 macro. But you're not updating
sysdeps/unix/sysv/linux/alpha/bits/typesizes.h or
sysdeps/mach/hurd/bits/typesizes.h; I'd expect those to be updated as well
for consistency.
--
Joseph S. Myers
joseph@codesourcery.com