From patchwork Mon Jul 4 17:08:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 71365 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1645137qgy; Mon, 4 Jul 2016 10:08:33 -0700 (PDT) X-Received: by 10.98.131.206 with SMTP id h197mr24131681pfe.124.1467652113451; Mon, 04 Jul 2016 10:08:33 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id g27si5113027pfa.159.2016.07.04.10.08.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 10:08:33 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-71512-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-71512-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-71512-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=vjGPFfXKEN08yKkYDb/3IKImxZUvQlsDW8mIPETehTIJ/BM2+QuBy kSe4HFj64zD+WqZegxLwIvNcn/yqB5MnC7kFuEKn6ZwBLapAYAk+4h0yQY8LRVUi 1ko3IVbUMrKk8i1nLQWAVc+PTm+onQ1jzu2rV9kosGHkRtN3SIcGCM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=D26lbKB+GB9PiOacm8r1wOFu1Mw=; b=rU/64JHx58uDKAGgcxtB4yXV1Zry oEvejh974nCDZSE5gTkoc1wF2x5d357PVgWAdDmbmKnrLMorQRq5IYDKAiM9Y8Iw ISzCJa1dY1CpN6R2dVSK1skjXEwAWTA+NcK/Z4jinT56D0pcNjWHwkBcCtieK2Pf UupZ1TpWmUtDWiI= Received: (qmail 18378 invoked by alias); 4 Jul 2016 17:08:25 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 18363 invoked by uid 89); 4 Jul 2016 17:08:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-yw0-f170.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=ZU/YJSIIyaEfhHDGjQDh6kRpzwXJBeeVfyd+kHeNWBI=; b=AR3THPVYY2OLmVR/JpRV13PbO6jo6plOSh5gO+hNl7IRBRe4yMYBnuP5aLa0Ns6mEK hdDs9ttf4lzCYg3ocrvbQWgwBBg6SYTLJ/dCwW56Vmx8nimUFFZceDYuhk3qIDW0qehZ tJiUu6Fmy5wGvjYmQ7UcJjmC5mTduw4edtAkE4IXoHbPmUAJTQb6jQBqcq3qy5jS3MTH Kgr0vg5TVmCKSG7bRZYFkVOX5nUYyOVeiUk/1GS1ZA/yvFdL1PNKMQi0D2KhACjpFIi3 WYAVxqirh6v+jWpW+8zhqrGuOBf+24KTMd/XXtGvNpG/hTp9O4Qzey4f76a+7QwO2szZ pheQ== X-Gm-Message-State: ALyK8tKpNYKuNYV5l84WJtTxY4ZIu7lwp1DodFJMl6DG8AWwTUt26f2k8dYiqVDnYTa0xB+s X-Received: by 10.129.73.86 with SMTP id w83mr7982946ywa.102.1467652091901; Mon, 04 Jul 2016 10:08:11 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] Fix LO_HI_LONG definition Date: Mon, 4 Jul 2016 14:08:00 -0300 Message-Id: <1467652080-19812-1-git-send-email-adhemerval.zanella@linaro.org> The p{read,write}v{64} consolidation patch [1] added a wrong guard for LO_HI_LONG definition. It currently uses both '__WORDSIZE == 64' and 'defined __ASSUME_WORDSIZE64_ILP32' to set the value to be passed in one argument, otherwise it will be split in two. However it fails on MIPS64n32 where syscalls n32 uses the compat implementation in the kernel meaning the off_t arguments are passed in two separate registers. GLIBC already defines a macro for such cases (__OFF_T_MATCHES_OFF64_T), so this patch uses it instead. Checked on x86_64, i686, x32, aarch64, armhf, and s390x. [1] 4751bbe2ad4d1bfa05774e29376d553ecfe563b0 --- ChangeLog | 4 ++++ sysdeps/unix/sysv/linux/sysdep.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/ChangeLog b/ChangeLog index 7213a8d..9983d6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2016-07-04 Adhemerval Zanella + * sysdeps/unix/sysv/linux/sysdep.h + [__WORDSIZE == 64 || __ASSUME_WORDSIZE64_ILP32] (LO_HI_LONG): Use + __OFF_T_MATCHES_OFF64_T to define macro. + * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_OFF_DIFF_OFF64): Remove define. * sysdeps/unix/sysv/linux/pread.c diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h index 8c9e62e..5c31249 100644 --- a/sysdeps/unix/sysv/linux/sysdep.h +++ b/sysdeps/unix/sysv/linux/sysdep.h @@ -49,7 +49,7 @@ #endif /* Provide a macro to pass the off{64}_t argument on p{readv,writev}{64}. */ -#if __WORDSIZE == 64 || defined __ASSUME_WORDSIZE64_ILP32 +#ifdef __OFF_T_MATCHES_OFF64_T # define LO_HI_LONG(val) (val) #else # define LO_HI_LONG(val) \