From patchwork Tue Jun 21 05:07:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 70517 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1832106qgy; Mon, 20 Jun 2016 22:14:18 -0700 (PDT) X-Received: by 10.36.219.131 with SMTP id c125mr2426265itg.33.1466486058131; Mon, 20 Jun 2016 22:14:18 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mv18si12188233pab.17.2016.06.20.22.14.17; Mon, 20 Jun 2016 22:14:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754353AbcFUFNx (ORCPT + 30 others); Tue, 21 Jun 2016 01:13:53 -0400 Received: from mail-by2on0054.outbound.protection.outlook.com ([207.46.100.54]:23376 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751793AbcFUFNs (ORCPT ); Tue, 21 Jun 2016 01:13:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h9A3QZv0k8mJqrTpLhOig9YUPW8TAUjyz/+2vC2YNws=; b=yv5/wj1YA9iNOygLTmDlxj4JnpNcYH24lZ3dxdf/hgnBTzJASVKFu9LqR1ieDD5OAOX6mv99a2XrFkbyY2MHtgfZsive4U740cRKVkCuSU4c4hh0neBoBIyCMMQP7acZDJjxjNLoq0iuKuxa5Qh45QO7XROe64NQL3v5Dr4O3KM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) with Microsoft SMTP Server (TLS) id 15.1.523.12; Tue, 21 Jun 2016 05:12:34 +0000 From: Yury Norov To: , CC: , , , , , , , , , Andrew Pinski , Yury Norov Subject: [PATCH 27/27] Fix PTRDIFF_MIN/PTRDIFF_MIN and PTRDIFF_MIN for ILP32. Date: Tue, 21 Jun 2016 08:07:11 +0300 Message-ID: <1466485631-3532-29-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> References: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: HE1PR03CA0017.eurprd03.prod.outlook.com (10.163.170.155) To DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) X-MS-Office365-Filtering-Correlation-Id: 025ed999-244a-4632-512a-08d39992a804 X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 2:5v1V54epqOofs4OO8O/VMQ7/yom9Fti6jyCCya1t/qnrEgz3MBn1ZlnSTGgo+MlB0Wo7WMkowpieTgOtP+XaueSEkr91dTg492IRpuDZbZUa6D2MJv6JjG6BgVuxuT25PtzPhP66wlWbNToNwE5UWnQ1OSgxt7Gx+2J+X6IjO+cwMwVhe7+FRzmSRFyI4gft; 3:YSx/mzp9qCCVMKW9IK4cGbTBUQg6kk70GxK8jkeofGGgmUWgMPeGQFXQT55OV7G4/5WcWR2lMu/22OeVn23psuHzZNwWlFTYOg2LPhESkxM6dbOnMJDQ0qiX0f/o7gvj X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3P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g6BG8ctvzXBUkp0m7XMuzEhtR11jlmDTFnIUQbwrXzyJNt6oj88tkFiKbqDl4MwuovvwjBvmIEFt3S43Q+i0bKJzfJtpQNhEpcjc384Cv311v2iGYmNcWewCNtMQr7SG7n+xCY6A7RUdVaL5O12V1jkJH/z5lTb1Ru38iFT2om74V0nddPdZzvtTO8jNrdO842WplPUBugB7eWAgLGiolVtjKGF/68U5lzufRO0lFqkNbLLMiS6kzoTTX+AYk6G7fS2/dztSI/n6TDU3zZBNL2BDmMbXXiZ/n4r2G1FgkexTeXfE9qHViswQ0u4SGyTKyMw2LAJ94ssSECam2jPev28oMPYR9itfH2BekBzWc5lU43Z49SThf+8sthhP7084= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:DM3PR07MB2249; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2249; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 4:KFGLFYlItoXKnyA4ALqIkU0A+gldP+ByhTXjxrm7i8cNe9Lr1aIiTjH4Kq2tQXeqE0xlShbWOKJLBF0QdO6tSb9/S+t/PglJanAuA7xTuZDpeZdOT/5MTbCBmmXXUakiRKzbFWl452iVHNUGysFxAzt01SfZwzxB4xZ7OL5IXBbUJQLwN6V3a9aYBujJpKmMMs2ZpLB8b61mwwoxeoY2gQu25WB3iQkwAxEGE1rY2Ad1ooRc4WKEiessaRImG3UUDnQR8BGoWwx0Uv3ygsm4VMzyaDR0ssfxjrXklowWoYx8uj97goYPmWDjVfq2p7kHl82z5bwDLzb8rPAAVH3pkg2tzEFx1b4eLEc7o8k58fBTE8b2GwMCW04IItNcitoB3zdKNWNzvVb7wza/NBnGTInyzFlYJ8JVxnoDJ53XIpI= X-Forefront-PRVS: 098076C36C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(2906002)(106356001)(33646002)(92566002)(8676002)(19580405001)(19580395003)(36756003)(97736004)(76506005)(48376002)(7846002)(50466002)(7736002)(68736007)(5003940100001)(101416001)(4326007)(189998001)(107886002)(42186005)(50226002)(50986999)(76176999)(6116002)(66066001)(3846002)(81166006)(229853001)(77096005)(81156014)(2950100001)(105586002)(4001430100002)(47776003)(586003)(5001770100001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2249; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR07MB2249; 23:Po/HORYh6FoTkGy3mDFj3JTTSgTOsW2MH03HmBsII?= =?us-ascii?Q?pzGK0I+KYv0UR0ykYWhYlKKLhNQWzGgU7ZUgKHgObGSAv9TquVZcn88JEhRy?= =?us-ascii?Q?RdoAEV/OETHN41xMGKQVwYVcnt8guupEIZ9+fPc12PRNsedJ514m8lBDW4yi?= =?us-ascii?Q?vRbB4HQNmBd/JSeLoyXhwl9mQ2e1+rGtd4gOkpQixJSSG+6M2ZcTs6Pl2w8p?= =?us-ascii?Q?1uhqUKUVGKtTRTQdrBP9jTx2BPG/3XzYZp+iXWhoaidEMd8LMUsXYZeJLrhJ?= =?us-ascii?Q?QuT3xtGDhZXsjLFjlaPqYwUkWVQ3vkLvhTRgCcafNMvTYy3yuS5AgtisTKqc?= =?us-ascii?Q?4KsYZHenV3MtKePwhgMdD0WEaXguWt0am93yeB0zmjwuWEJnmeq7q+lgH4SZ?= =?us-ascii?Q?c+7NRRtpEM6t3gxSWIcfNki5KRfmPDU/aBQIuT7IOoCvnMINB06w081UxZIC?= =?us-ascii?Q?/8aofQ1gKRuV1r+vXxNb4zaZxPaHhsd4+vvBNvZV7bFWky/oZdQVauFt1sMB?= =?us-ascii?Q?spgVhTwLMqQIZmhbDE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8ZlGN26tGQcCZcaR1hcH9ZhBNd8mNgAcpEh9toKn8hgDFwduEAFtK4E7hy61bTQeKUEip5COqY0aFx9HQNkH7O9aiS1n3gr5OgVWdj1Z127QUGZzYRSC2dZLWxLYzT75fs0cUoT+hOkCY58EQ==; 24:61Ye/VEIyvertxDnGy50yBxdShwVpqONKN5o500Xis9fcP1gRzvuScU4/kOT307GT2BLpmcBUJiPYnRIDXqd5qzh73PQJ2ZdwWKLL0zhb8c=; 7:LB88hEheFAN6Igik6tuLJiKYr+VkPOpX7wC9Such3WEEfr3K5lOjYVqzJuag96+rp2wjqYhveDJ4QsAI1bqWNtdsWkXZZA9dLeREA84aGbPUOh/Z00DLKMHQi7I6/tjsx/NOffU68GG0ER5VRf1ZITpPPc3wpOq/TC7t4h4vInQ2zFfMO81X7uwKi8R8AvnyAouOL9PpKiPaeZn0LhGTcKJW5gOsVmVDp+owXxAdB8UWMq5URdgyRk3oWmfPmb9q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 05:12:34.7678 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2249 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Pinski Signed-off-by: Andrew Pinski Signed-off-by: Yury Norov --- sysdeps/aarch64/bits/wordsize.h | 8 +++----- sysdeps/generic/stdint.h | 9 +++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) -- 2.7.4 diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h index 3d5a79d..18697e2 100644 --- a/sysdeps/aarch64/bits/wordsize.h +++ b/sysdeps/aarch64/bits/wordsize.h @@ -19,12 +19,10 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 1 #endif -/* LP64 and ILP32s ABI uses a 64bit time_t. - This allows aarch32 and AARCH64 applications +/* This allows ILP32 and AARCH64 applications both access utmp. */ #define __WORDSIZE_TIME64_COMPAT32 1 - -/* LP64 and ILP32 use the 64bit system call interface. */ -#define __SYSCALL_WORDSIZE 64 diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 4427627..05f895a 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -248,8 +248,13 @@ typedef unsigned long long int uintmax_t; # define PTRDIFF_MIN (-9223372036854775807L-1) # define PTRDIFF_MAX (9223372036854775807L) # else -# define PTRDIFF_MIN (-2147483647-1) -# define PTRDIFF_MAX (2147483647) +# ifdef __WORDSIZE32_PTRDIFF_LONG +# define PTRDIFF_MIN (-2147483647L-1) +# define PTRDIFF_MAX (2147483647L) +# else +# define PTRDIFF_MIN (-2147483647-1) +# define PTRDIFF_MAX (2147483647) +# endif # endif /* Limits of `sig_atomic_t'. */