From patchwork Wed Oct 26 19:39:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 79538 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp242049qge; Wed, 26 Oct 2016 12:40:07 -0700 (PDT) X-Received: by 10.98.59.66 with SMTP id i63mr7092114pfa.124.1477510807304; Wed, 26 Oct 2016 12:40:07 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id h29si4306442pfd.139.2016.10.26.12.40.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Oct 2016 12:40:07 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-74115-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-74115-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74115-patch=linaro.org@sourceware.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:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version; q=dns; s=default; b=NTRdX 1PeyqLMGXgwcMtWd8j0RdlMTFw3nu4wJcBGgdb62DwjxSm+PTxA3QZH64961y0Wu 5gEaN89FDhjcBwSUJNwPZJ9gI05Er6DD7RZOFrQXwp513ozhke6qXPYDQHy6QB45 WONihppCyJ3e4uAiyUs53olhf9v9Y4ntzSa2gI= 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:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version; s=default; bh=qUNa15F9M5N Mb7ZWDJWsJowROEs=; b=Zpl3Ac2Z9XEiFEhrQ1YTJ1DubkXS0c/pr2LF1CWJdRW 6FWkOEH3vxAcxCuD8cQr1uY8XrXMy4G+L7uux4k2m9uL7iX6MSzO9GxXsi/GH+n0 JVY/k/MP/o+f+rj/zpRhwQFjvuCjeLCMpQpTQsBGRwgV8LYlVfLLbFOq12IiFdRw = Received: (qmail 120297 invoked by alias); 26 Oct 2016 19:39:55 -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 120285 invoked by uid 89); 26 Oct 2016 19:39:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: NAM01-SN1-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; Message-ID: <1477510777.26691.9.camel@caviumnetworks.com> Subject: Re: [PATCH] Define wordsize.h macros everywhere From: Steve Ellcey To: CC: Date: Wed, 26 Oct 2016 12:39:37 -0700 In-Reply-To: <1477506839.26691.5.camel@caviumnetworks.com> References: <1477506839.26691.5.camel@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: BY1PR13CA0030.namprd13.prod.outlook.com (10.162.107.168) To SN2PR0701MB1071.namprd07.prod.outlook.com (10.160.59.17) X-MS-Office365-Filtering-Correlation-Id: a8753ac3-0aec-4a94-2519-08d3fdd7d47b X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 2:Fs7FWZMc9oQVZ0cRixXIQGfPrdw+hWj/S51DuNRAmb8W2WRUwEjgC5Kr8SSdhQukvFpMm644Ea5DsRnP3SIO+wKaNacmWTU493OBRlv5f6FRd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ibIWobB4zs82xA3vFFVFYRkTOH+7GS3eE8K+svk5IO0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:SN2PR0701MB1071; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1071; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 4:FVJ9itMJuFxmIPiUmHzMWdrCYWgxl5PErvAOmvUqJAHcUa6fn3O+U9HY6XFfRHsUmsgpcHcTLALcs+f1LQlkwzjjJkT7ofDq7KlzhtNXP7ZPTzn92hZNZDmADvecl/IzQUmfzhJWftOXB/IdqjaHI96g8Lh7x9rPatII1kcotn/SXNEMYObIz/rE5jsyWF4lB7ffubh216qaXrMSBp5aoO+Go/Ps2Jy1YL5+5wPIfSdTS7u3OphegrhZYHMOv8adZN+Y7O6IkK2QKFsnqJZiHapukeV3XoLGQJniq183ucqsJO5B47frn52eRYc7An96aANOmBNeHrJRx2uiFRjWD6sraBJq7GndCvO2IRCALvpDxJGlDkb8YLCInrYKtA30Piv4PuTA3S0Q92NxJPYgjsAUsQ+HXNyw4UenSdfJGI8= X-Forefront-PRVS: 0107098B6C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(36756003)(103116003)(2906002)(19580395003)(19580405001)(2476003)(110136003)(66066001)(33646002)(92566002)(50226002)(4326007)(84326002)(5890100001)(189998001)(4001430100002)(77096005)(69596002)(5000100001)(4610100001)(101416001)(42186005)(305945005)(50986999)(450100001)(270700001)(107886002)(2351001)(97736004)(7736002)(53416004)(76176999)(568964002)(7846002)(586003)(512874002)(68736007)(106356001)(2950100002)(5660300001)(3846002)(6666003)(6116002)(42882006)(564344004)(6916009)(81166006)(81156014)(105586002)(8676002)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1071; H:sellcey-lt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR0701MB1071; 23:ffiwrEbrhxm5kzJozsw3lTwgRnYdZU8tvT7Kpgh?= =?us-ascii?Q?UHE9N0al3ts1TRA5sU1TPUsWRM3g2+ncfbyeh5tpFXab+Lb4bxkJQE3S30TS?= =?us-ascii?Q?v1GNWjqyKdJJbSmjQsK7GykUSecpnjpmZJKFivyEkHVwXpShm70vSVjd7x3e?= =?us-ascii?Q?bO4htasdJqPTEhYuy1QIbBoeKK1Y0R35TPgfpffSoMaD8LX4GuY+ZKTb7YJ2?= =?us-ascii?Q?nhRIKIMSBWVv6HV+Bqq31S0cP8otwCqsGmeHACMs170l6ZuvqERBB2WftwUt?= =?us-ascii?Q?uRLd+uCIpLpyh1U/ITb9c/qsjWl/tOZcAw0T7iI1Dqo36/oub/IO616Hod7i?= =?us-ascii?Q?hjDGB95n2qkSL9YYR/npfXoDiq/vdg8KiO/7v9/VoBEfcNv4ZIDopM3AqT5g?= =?us-ascii?Q?5723oes9yVUum9wwerNLG1HLEPzBKzNB+ljL40HEjCWnRmec5hhIaOrEcuGE?= =?us-ascii?Q?xzuPLKLvViB1amN7uxdOiqOxcWx6lw4ZuxxKQm3mLYgYQS4vhrs/BrCba8HI?= =?us-ascii?Q?CD42UJhlGnoAHeKNMbCQ3T0usst725LmuyEOgiL89WR/96ABqWyHmeOL7EHl?= =?us-ascii?Q?475dTJFZIfgW3SLh2461S56O3XBmP1zHVNys17+R7l8e6py2a//NlpQEtae9?= =?us-ascii?Q?QZ3Yu9x7+/R8dS+pESrD0SSmpEq5xTH4pwZRkHL4z9T1FT4sNfKXRd/r1QwV?= =?us-ascii?Q?BKdjeCFva04EVScxK5ZjrKMYUqEZ67aKnDMJ9SaWn3TGN0B+uIIIVqKBGTb5?= =?us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2z4PW1IJMu66MAUvR8li+jdOEUpFAEOzHjJHZ0T/f+IRFqxvtPW1HRtec2PvvZUft1r/jhfWsbSKz; 5:/BZ6prSVDr2UkWKwe5oomIgr62chIWmj0M/XkjRoEcfoCQIvmgrFsVA7/Bre/XSe9y1x9wL4BIKplucizG0PzE7sbc6b4YTyirMa2da0i/UWuBCCDymvOjlLILCvqn94SQV5KYFXSgcIKfj3+nf1bg==; 24:N9qc7J8Sc+JKRwDWsouqQjQLsMNBHJyZ55CGTLYskfrJr4zYfs2eYQ7y0Azu3dBCrqV4rb6Ok1Ojh1YKblPPt+9+w1RVjXjpc9fJf7xUXbs=; 7:aB1q7bcoXLueoTrL4TTSBXknfaO5HY1La78gAkZ2d5UpogMlZSrhbBHsnP2Wp2GWXkoHjzYSnvuTRztENmaM42ISMPTEs4IxqTm78LTNNk/+EcZd4gqGAMP8Ot8smGQOzsTBO+txeGRU00WXuOgAIeyCpMnLSetOwTUDcYqEDW8BvJfFrnue9cGS4JhU+J7Kd+8XCeMEelJ6Gq8OMGt5MAewZFhQ19TQvwEJif4HlMJJf5Q+lRlehwWIN/dSCPmDYQsCoLQ4gmY/57YQcKffwZY8VFQT7Jz79+cPPRFkmvCcnHJqPfJr/yTLoSjd6DYAfACndFmfj/ulkp7thxw35gRM+8pYteM0zKM8k3INVCo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2016 19:39:41.2096 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1071 I got mail saying my patch may have been mangled by the emailer I am using so here it is again as an attachment in case anyone else is having problems with it. Steve Ellcey sellcey@caviumnetworks.com diff --git a/bits/wordsize.h b/bits/wordsize.h index 9ef0e85..2ebecd6 100644 --- a/bits/wordsize.h +++ b/bits/wordsize.h @@ -1 +1,28 @@ #error "This file must be written based on the data type sizes of the target" + +/* The following entries are a template for what defines should be in the + wordsize.h header file for a target. */ + +/* Bits per word (size of CPU register). */ +#define __WORDSIZE + +/* Set to the size of the f_fsid field in the statvfs and statvfs64 structs. + In most cases this is the same as __WORDSIZE but some 32 bit hosts may set + it to 64. */ +#define __SYSCALL_WORDSIZE + +/* Set to 1 if ssize_t is type 'unsigned long' instead of type 'unsigned int' + so that SIZE_MAX is defined as an unsigned long constant instead of an + unsigned int constant. Set to 0 if ssize_t is 'unsigned int'. */ +#define __WORDSIZE32_SIZE_ULONG + +/* Set to 1 if ptrdiff_t is type 'long' instead of type 'int' so that + PTRDIFF_MIN and PTRDIFF_MAX are defined as long constants instead of + int constants. Set to 0 if ptrdiff_t is type 'int'. */ +#define __WORDSIZE32_PTRDIFF_LONG + +/* Set to 1 in order to force time types to be 32 bits instead of 64 bits in + struct lastlog and struct utmp{,x} on 64-bit ports. This may be done in + order to make 64-bit ports compatible with 32-bit ports. Set to 0 for + 64-bit ports where the time types are 64-bits or for any 32-bit ports. */ +#define __WORDSIZE_TIME64_COMPAT32 diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h index e69de29..c907986 100644 --- a/sysdeps/aarch64/bits/wordsize.h +++ b/sysdeps/aarch64/bits/wordsize.h @@ -0,0 +1,31 @@ +/* Determine the wordsize from the preprocessor defines. + + Copyright (C) 2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifdef __LP64__ +# define __WORDSIZE 64 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 1 +#endif + +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 5428dbc..8e4347c 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -249,8 +249,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) +# if __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'. */ @@ -261,7 +266,7 @@ typedef unsigned long long int uintmax_t; # if __WORDSIZE == 64 # define SIZE_MAX (18446744073709551615UL) # else -# ifdef __WORDSIZE32_SIZE_ULONG +# if __WORDSIZE32_SIZE_ULONG # define SIZE_MAX (4294967295UL) # else # define SIZE_MAX (4294967295U) diff --git a/sysdeps/gnu/bits/utmp.h b/sysdeps/gnu/bits/utmp.h index 2a1ffcb..bce1a7b 100644 --- a/sysdeps/gnu/bits/utmp.h +++ b/sysdeps/gnu/bits/utmp.h @@ -35,7 +35,7 @@ previous logins. */ struct lastlog { -#ifdef __WORDSIZE_TIME64_COMPAT32 +#if __WORDSIZE_TIME64_COMPAT32 int32_t ll_time; #else __time_t ll_time; @@ -68,7 +68,7 @@ struct utmp /* The ut_session and ut_tv fields must be the same size when compiled 32- and 64-bit. This allows data files and shared memory to be shared between 32- and 64-bit applications. */ -#ifdef __WORDSIZE_TIME64_COMPAT32 +#if __WORDSIZE_TIME64_COMPAT32 int32_t ut_session; /* Session ID, used for windowing. */ struct { diff --git a/sysdeps/gnu/bits/utmpx.h b/sysdeps/gnu/bits/utmpx.h index b41548b..a438660 100644 --- a/sysdeps/gnu/bits/utmpx.h +++ b/sysdeps/gnu/bits/utmpx.h @@ -66,7 +66,7 @@ struct utmpx /* The fields ut_session and ut_tv must be the same size when compiled 32- and 64-bit. This allows files and shared memory to be shared between 32- and 64-bit applications. */ -#ifdef __WORDSIZE_TIME64_COMPAT32 +#if __WORDSIZE_TIME64_COMPAT32 __int32_t ut_session; /* Session ID, used for windowing. */ struct { diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h index bc90435..6d476ba 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -17,7 +17,13 @@ #include -#define __WORDSIZE _MIPS_SZPTR +#define __WORDSIZE _MIPS_SZPTR +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 + #if _MIPS_SIM == _ABI64 # define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE_TIME64_COMPAT32 0 #endif diff --git a/sysdeps/powerpc/powerpc32/bits/wordsize.h b/sysdeps/powerpc/powerpc32/bits/wordsize.h index f31ac9a..f08ab26 100644 --- a/sysdeps/powerpc/powerpc32/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc32/bits/wordsize.h @@ -5,4 +5,9 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/powerpc/powerpc64/bits/wordsize.h b/sysdeps/powerpc/powerpc64/bits/wordsize.h index f31ac9a..f08ab26 100644 --- a/sysdeps/powerpc/powerpc64/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc64/bits/wordsize.h @@ -5,4 +5,9 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/s390/s390-32/bits/wordsize.h b/sysdeps/s390/s390-32/bits/wordsize.h index da791fa..7ac7e6b 100644 --- a/sysdeps/s390/s390-32/bits/wordsize.h +++ b/sysdeps/s390/s390-32/bits/wordsize.h @@ -2,11 +2,16 @@ #if defined __s390x__ # define __WORDSIZE 64 +# define __WORDSIZE32_SIZE_ULONG 0 #else # define __WORDSIZE 32 # define __WORDSIZE32_SIZE_ULONG 1 #endif +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 + #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal that we didn't used to have a `long double'. The changes all diff --git a/sysdeps/s390/s390-64/bits/wordsize.h b/sysdeps/s390/s390-64/bits/wordsize.h index da791fa..7ac7e6b 100644 --- a/sysdeps/s390/s390-64/bits/wordsize.h +++ b/sysdeps/s390/s390-64/bits/wordsize.h @@ -2,11 +2,16 @@ #if defined __s390x__ # define __WORDSIZE 64 +# define __WORDSIZE32_SIZE_ULONG 0 #else # define __WORDSIZE 32 # define __WORDSIZE32_SIZE_ULONG 1 #endif +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 + #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal that we didn't used to have a `long double'. The changes all diff --git a/sysdeps/sparc/sparc32/bits/wordsize.h b/sysdeps/sparc/sparc32/bits/wordsize.h index d8fd1a5..73a3b7c 100644 --- a/sysdeps/sparc/sparc32/bits/wordsize.h +++ b/sysdeps/sparc/sparc32/bits/wordsize.h @@ -5,4 +5,9 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/sparc/sparc64/bits/wordsize.h b/sysdeps/sparc/sparc64/bits/wordsize.h index d8fd1a5..73a3b7c 100644 --- a/sysdeps/sparc/sparc64/bits/wordsize.h +++ b/sysdeps/sparc/sparc64/bits/wordsize.h @@ -5,4 +5,9 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/tile/tilegx/bits/wordsize.h b/sysdeps/tile/tilegx/bits/wordsize.h index 5d4e4b4..f5db53a 100644 --- a/sysdeps/tile/tilegx/bits/wordsize.h +++ b/sysdeps/tile/tilegx/bits/wordsize.h @@ -5,4 +5,9 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/tile/tilepro/bits/wordsize.h b/sysdeps/tile/tilepro/bits/wordsize.h index da587a2..e1f21c9 100644 --- a/sysdeps/tile/tilepro/bits/wordsize.h +++ b/sysdeps/tile/tilepro/bits/wordsize.h @@ -1,3 +1,7 @@ /* Determine the wordsize from the preprocessor defines. */ -#define __WORDSIZE 32 +#define __WORDSIZE 32 +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h index 51fc433..e1a3cdb 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h @@ -16,6 +16,10 @@ . */ #define __WORDSIZE 64 +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h index 9244401..fcdd2cd 100644 --- a/sysdeps/unix/sysv/linux/bits/statvfs.h +++ b/sysdeps/unix/sysv/linux/bits/statvfs.h @@ -21,8 +21,7 @@ #include /* For __fsblkcnt_t and __fsfilcnt_t. */ -#if (__WORDSIZE == 32 \ - && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) +#if (__WORDSIZE == 32 && __SYSCALL_WORDSIZE == 32) #define _STATVFSBUF_F_UNUSED #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h index 3e8a1e0..aaec974 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h @@ -5,8 +5,13 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 + #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. diff --git a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h index 2d958d2..5df97ab 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h @@ -6,6 +6,11 @@ # define __WORDSIZE 32 #endif +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 + #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL # if __WORDSIZE == 32 diff --git a/sysdeps/wordsize-32/bits/wordsize.h b/sysdeps/wordsize-32/bits/wordsize.h index 2aa16bc..3454d7f 100644 --- a/sysdeps/wordsize-32/bits/wordsize.h +++ b/sysdeps/wordsize-32/bits/wordsize.h @@ -15,4 +15,8 @@ License along with the GNU C Library; if not, see . */ -#define __WORDSIZE 32 +#define __WORDSIZE 32 +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/wordsize-64/bits/wordsize.h b/sysdeps/wordsize-64/bits/wordsize.h index 0944f9e..5a4b6c5 100644 --- a/sysdeps/wordsize-64/bits/wordsize.h +++ b/sysdeps/wordsize-64/bits/wordsize.h @@ -15,4 +15,8 @@ License along with the GNU C Library; if not, see . */ -#define __WORDSIZE 64 +#define __WORDSIZE 64 +#define __SYSCALL_WORDSIZE __WORDSIZE +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/x86/bits/wordsize.h b/sysdeps/x86/bits/wordsize.h index e25af28..0834c13 100644 --- a/sysdeps/x86/bits/wordsize.h +++ b/sysdeps/x86/bits/wordsize.h @@ -6,8 +6,14 @@ # define __WORDSIZE 32 #endif +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 + #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 +#else +# define _WORDSIZE_TIME64_COMPAT32 0 +# define __SYSCALL_WORDSIZE 32 #endif