This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 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 gmail dot com>
- Date: Thu, 3 Oct 2019 20:03:04 +0000
- Subject: Re: [PATCH v3 2/2] Define __STATFS_MATCHES_STATFS64
- Ironport-sdr: UmAc+xveoJWGbSKUEC5b7i6w9NX71XRqCKAMR9GHIRWPpTURjhE1bpQpwgO+4sl07HlLQbP9tq g5fdcfHpm0BY8UcSZW5/sUttf3LLSYmvC/Hp7cjZpWoPIanEcuCxVTYT5WPtSRmMK8p/Bemnwx oJTlhzMbHRm33wewA2eGCKYAHSA8AzJZy/IM2SqMkCZEb9a+X32++IMG+wFaFKixTfwWedTjFc yNlWplUzHw2GclEFF/D73FcKTj8VISMw5+XBGvLcnLSHXJgcAQ2clms5Qn71Jb9vWYuW7lofht Hl0=
- Ironport-sdr: BOcnEsCXBOoockaD+YMhgU4X3X1/6CrECbJGrJnw9UcaXhTRWAqIC4LMU4oKLZ0FqZh28KECPn weWjXr458v2oiszcOaCDnLpboXehixzX5dr3Tds71UEwlwdWf7+9ebR3M3NSd5Yr4ydPV8eoAp MyY+ynfQKlU+v63Eq0vhziB3uaWxtISfEkGzdIpcr5oKfDGUwDspVRQCs5wEm0Uk4/DRAG2eiK ojwv0Ccm7YW7pHSfr6qTjmdgdcSsQn/CyT2umSTsfu0JO63hqEtxSZSYN0+I5N6J+ckA9qNtxI qx0=
- References: <20191003174131.18673-1-alistair.francis@wdc.com> <20191003174131.18673-2-alistair.francis@wdc.com>
On Thu, 3 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.
As a new macro it would be better to use the 0/1 convention (always
defined, at least for linux/generic configurations that need it) rather
than undefined / defined. A default definition can go in bits/typesizes.h
with a comment.
> -#if defined __USE_FILE_OFFSET64
> +#if defined __USE_FILE_OFFSET64 || defined __STATFS_MATCHES_STATFS64
> # define __field64(type, type64, name) type64 name
> #elif __WORDSIZE == 64
As in the stat case, I think it would be best to put the "|| defined
__STATFS_MATCHES_STATFS64" in the __WORDSIZE == 64 case not the
__USE_FILE_OFFSET64 case.
--
Joseph S. Myers
joseph@codesourcery.com