This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Remove __ASSUME_OFF_DIFF_OFF64 definition


On Fri, Jul 8, 2016 at 11:10 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
> I will commit this shortly if no one opposes it.
>
> On 07/07/2016 12:17, Adhemerval Zanella wrote:
>> Ping for this first part one (I postpone second and third part to 2.25).
>>
>> On 28/06/2016 16:04, Adhemerval Zanella wrote:
>>> This patch removes the __ASSUME_OFF_DIFF_OFF64 define introduced in
>>> p{read,write} consolidation patch.  This define was added based on
>>> the idea 32 bits ports would continue to follow previous off{64}_t
>>> definition where off_t size differs from off64_t one.
>>>
>>> However, with recent AArch64/ILP32 patch submission and also with
>>> discussion for RISCV kernel interface, 32 bits ports now may aim
>>> to use off_t and off64_t with the same size as 64 bits.
>>>
>>> So current assumption for both p{read,write} and p{read,write}v
>>> are not compatible with new type definition.  This patch now makes
>>> the syscall wrappers to only depend on __OFF_T_MATCHES_OFF64_T to
>>> define the default and 64-suffix variant, as follow:
>>>
>>>   <function>.c
>>>   #ifndef __OFF_T_MATCHES_OFF64_T
>>>   /* build <function> */
>>>   #endif
>>>
>>>   and
>>>
>>>   <function>64.c
>>>
>>>   /* build <function>64 */
>>>   #ifdef __OFF_T_MATCHES_OFF64_T
>>>   weak_alias (fallocate64, fallocate)
>>>   #endif
>>>
>>> Tested on x86_64, i686, x32, and armhf.
>>>
>>>      * sysdeps/unix/sysv/linux/mips/kernel-features.h
>>>      (__ASSUME_OFF_DIFF_OFF64): Remove define.
>>>      * sysdeps/unix/sysv/linux/pread.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread): Replace by
>>>      __OFF_T_MATCHES_OFF64_T.
>>>      * sysdeps/unix/sysv/linux/pread64.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread64): Likewise.
>>>      * sysdeps/unix/sysv/linux/preadv.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv): Likewise.
>>>      * sysdeps/unix/sysv/linux/preadv64.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv64): Likewise.
>>>      * sysdeps/unix/sysv/linux/pwrite.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite): Likewise.
>>>      * sysdeps/unix/sysv/linux/pwrite64.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite64): Likewise.
>>>      * sysdeps/unix/sysv/linux/pwritev.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev): Likewise.
>>>      * sysdeps/unix/sysv/linux/pwritev64.c
>>>      [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev64): Likewise.
>>> ---
>>>  ChangeLog                                      | 22 ++++++++++++++++++++++
>>>  sysdeps/unix/sysv/linux/mips/kernel-features.h |  1 -
>>>  sysdeps/unix/sysv/linux/pread.c                |  2 +-
>>>  sysdeps/unix/sysv/linux/pread64.c              |  2 +-
>>>  sysdeps/unix/sysv/linux/preadv.c               |  2 +-
>>>  sysdeps/unix/sysv/linux/preadv64.c             |  2 +-
>>>  sysdeps/unix/sysv/linux/pwrite.c               |  2 +-
>>>  sysdeps/unix/sysv/linux/pwrite64.c             |  2 +-
>>>  sysdeps/unix/sysv/linux/pwritev.c              |  2 +-
>>>  sysdeps/unix/sysv/linux/pwritev64.c            |  2 +-
>>>  10 files changed, 30 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/ChangeLog b/ChangeLog
>>> index 932ec5b..ce4471e 100644
>>> --- a/ChangeLog
>>> +++ b/ChangeLog
>>> @@ -1,3 +1,25 @@
>>> +2016-06-28  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
>>> +
>>> +    * sysdeps/unix/sysv/linux/mips/kernel-features.h
>>> +    (__ASSUME_OFF_DIFF_OFF64): Remove define.
>>> +    * sysdeps/unix/sysv/linux/pread.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread): Replace by
>>> +    __OFF_T_MATCHES_OFF64_T.
>>> +    * sysdeps/unix/sysv/linux/pread64.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread64): Likewise.
>>> +    * sysdeps/unix/sysv/linux/preadv.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv): Likewise.
>>> +    * sysdeps/unix/sysv/linux/preadv64.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv64): Likewise.
>>> +    * sysdeps/unix/sysv/linux/pwrite.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite): Likewise.
>>> +    * sysdeps/unix/sysv/linux/pwrite64.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite64): Likewise.
>>> +    * sysdeps/unix/sysv/linux/pwritev.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev): Likewise.
>>> +    * sysdeps/unix/sysv/linux/pwritev64.c
>>> +    [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev64): Likewise.
>>> +

I think this caused:

https://sourceware.org/bugzilla/show_bug.cgi?id=20348


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]