This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [glibc PATCH] fcntl: put F_OFD_* constants under #ifdef __USE_FILE_OFFSET64
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jeff Layton <jlayton at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>, <linux-fsdevel at vger dot kernel dot org>, Michael Kerrisk <mtk dot manpages at gmail dot com>, Carlos O'Donell <carlos at redhat dot com>, Yuriy Kolerov <Yuriy dot Kolerov at synopsys dot com>
- Date: Wed, 17 Aug 2016 15:44:08 +0000
- Subject: Re: [glibc PATCH] fcntl: put F_OFD_* constants under #ifdef __USE_FILE_OFFSET64
- Authentication-results: sourceware.org; auth=none
- References: <1471445251-2450-1-git-send-email-jlayton@redhat.com>
On Wed, 17 Aug 2016, Jeff Layton wrote:
> +# if __WORDSIZE != 32 || defined __USE_FILE_OFFSET64
Are you sure __WORDSIZE is always defined here? I don't see an include of
<bits/wordsize.h> in this header.
Are you sure __WORDSIZE != 32 is the right condition on all architectures
for the flock and flock64 structures being the same? Wordsize is not a
particularly well-defined concept all cases. More specific tests tend to
be preferred, e.g. __OFF_T_MATCHES_OFF64_T in bits/typesizes.h (so this
would indicate having a new macro __FLOCK_MATCHES_FLOCK64 and arranging
for it to be defined to 1 or 0 correctly in all cases - or at least a
careful analysis of all architectures using this file to show that some
other conditional is always correct).
--
Joseph S. Myers
joseph@codesourcery.com