From patchwork Fri Jul 8 12:09:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13701 Received: (qmail 96587 invoked by alias); 8 Jul 2016 12:09:40 -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 96573 invoked by uid 89); 8 Jul 2016 12:09:38 -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=2, 9, H*r:104.47.33 X-HELO: NAM01-BN3-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , CC: , , , , , , , , , , , Yury Norov , Andrew Pinski Subject: [PATCH v2] all: #define wordsize-related macros everywhere Date: Fri, 8 Jul 2016 15:09:12 +0300 Message-ID: <1467979752-14761-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: AMSPR04CA0038.eurprd04.prod.outlook.com (10.242.87.156) To DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) X-MS-Office365-Filtering-Correlation-Id: 58274b85-3c38-49de-19f6-08d3a728b37b X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 2:tjxIs1KxsxjUemk3uEBKORka2PzlVEUQ/UDGlQwxjy+SImt5XUPagA/ecQRXiCQN9tPSLKjZH8T47Vlo1pmsa8IKZuppa0pnlO5W0vurrasrYFZho5JAXbwIOXovKTGKdtQbP+i7l5TWR1QygFaZ9yJxIjIF8jNQSeeNLxv8lkgfDlvXnqwPuAt9cHheyihf; 3:xzTWeqhms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H6K0= X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 31:LEORnkJxFD9aK80BJfUpuiQakYEfOylYzPtSdQyDLLmegpb8teGDRjbBmF30wDajVWanm5gMgvEVkXkmWhijkRBKnytx80ElnvLuG8fqg3OH0cSDmZa15s5oVbYveoekR4BOtYKbGZCyvmiw9VDqE7vPI9MUFhwCaxsTXvm29zwkQTK7phwKJkuu730UnSBLV2vGRfWEcVxt+w1Jp0TbeA==; 20:7/DLzXVZfAmfrZ6vj5Qse2GUm1y8K+mBVYrb9QrNSpXfCELcpt5xQr/4I9cq/p50MoYiwv68QDk5+K1Fd10sQdTGnDfCrVlS+FeolVrogVxTPyMNSjA77nCW0yc4ijHp+NxDvGfSI8uUzkEnq2s18SC/9N5KtJS5XJyNa7jhleSgWOMIWAIsgXCdYizj3JARa4ydwLRGbZ8S7a5/o7ZvpNBb3L6Bn31hABhyTkND4KQDzcDppy3sFswPwuLX1B+WfrwtgcRGxk82SXxjup7zl4G6nQyltpbP+cgw934m+9f3Up8xXCFeqMOdvw/PKeDL7rMKlmdvy9ZrYg09gmiT2xydHQZydsLJJP0sPSKdCyg/WM/DQPuE0tkeZGg8JQQ3wgr9HeBtlmokUqb79RoSNhXOFfdFFzmYDcF1sZwD5wfReO81HDLdqUCM57Ugqv+fYe5a2aXHGEF8OObIzO3AZSe0C75tXCcroi5aVLwMlz7Q5lviZ3UCLp6NmrxMcQkP0WoFJH+2qzv959QUJHiKdbliTTcJRt15lrkGIzQtMU2VyRzVQ16gEyCyoV/9vLJK3GOJ1U2o0wWGMCXFM/0mdjIxqKGIt6EI+YUJjKdghPs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:DM3PR07MB2249; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2249; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 4:6F6hW3824u5gaRe2NUQnFkaIUVRyOEG0enMT6AfZ1sQwSlPE13gMrNu2uK6Ixu6z/RfVV7yMd3VsDBCj5qcJO7VxSJ823J+cr2oJCKpGOM0/MmAx1jbrwHds4NalEqD4wiDy/tIH7zOosjJnv/qzDg6nRn4q91LB3zny+bFXSSjx5ooFO6zFI5lOhkHqE6Y5avYESvAUWkl5c0vtd7YQ6hgyJ5+p6Ju3PFRiCyM29e4wT775SwX5jtIqJSP6xJIXpqYV9GanJndbaMMjmOOebGaNmNnIV+JxorILTzcp7HVPaCQAawGLfFMOAGiN2+kpVZu7fUYIMILFLSXyneduuqIA/2vYaTY06TgSkXnQzZfgsWCYYCQnoImCCPFJ6tz7jhPQw+6YfbkiTSbsUGP0VvIaRN9FMTq0OCgCg/NAA55Q+Q9bsuSe/Qlhz2CRt1SH X-Forefront-PRVS: 0997523C40 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(47776003)(4326007)(4001430100002)(33646002)(76506005)(101416001)(19580405001)(2906002)(50986999)(575784001)(106356001)(105586002)(6116002)(77096005)(7736002)(92566002)(229853001)(48376002)(7846002)(189998001)(5003940100001)(586003)(3846002)(107886002)(50226002)(15975445007)(5001770100001)(42186005)(50466002)(81166006)(305945005)(8676002)(81156014)(68736007)(19580395003)(97736004)(66066001)(36756003)(2004002); 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:XGDvRAyuhgNCsHMQX2tEtL0aZxerumiDj44sfyJKv?= =?us-ascii?Q?9byerKZ4dGS+ZaUoNukQiTUAfBbP85nhnwig09PrjEQk89IzX13h0rq+xu7w?= =?us-ascii?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DtYGd5rsm87AcyJ0Dp/z8r9OQ14JOhoISA98 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2016 12:09:23.7158 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2249 __WORDSIZE_TIME64_COMPAT32 and __WORDSIZE32_SIZE_ULONG should be defined to 0 but it's not defined at all for many targets. __WORDSIZE32_PTRDIFF_LONG is introduced for aarch64/ilp32, and defined for all other ports as well. This patch is the part of aarch64/ilp32 work but it can be applied separately as it fixes inconsistency in GLIBC. v2: - added __WORDSIZE_TIME64_COMPAT32; - added documentation; - removed newlines at the end of files. * sysdeps/aarch64/bits/wordsize.h : New file (__WORDSIZE32_SIZE_ULONG): Define. (__WORDSIZE_TIME64_COMPAT32): Define. (__WORDSIZE32_PTRDIFF_LONG): New define. * sysdeps/mips/bits/wordsize.h: Likewise. * sysdeps/powerpc/powerpc32/bits/wordsize.h: Likewise. * sysdeps/powerpc/powerpc64/bits/wordsize.h: Likewise. * sysdeps/s390/s390-32/bits/wordsize.h: Likewise. * sysdeps/s390/s390-64/bits/wordsize.h: Likewise. * sysdeps/sparc/sparc32/bits/wordsize.h: Likewise. * sysdeps/sparc/sparc64/bits/wordsize.h: Likewise. * sysdeps/tile/tilegx/bits/wordsize.h: Likewise. * sysdeps/tile/tilepro/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/wordsize.h: Likewise. * sysdeps/wordsize-32/bits/wordsize.h: Likewise. * sysdeps/wordsize-64/bits/wordsize.h: Likewise. * sysdeps/x86/bits/wordsize.h: Likewise. * sysdeps/generic/stdint.h: Use #if instead of #ifdef for that macros. * sysdeps/gnu/bits/utmp.h: Likewise. * sysdeps/gnu/bits/utmpx.h: Likewise. * bits/wordsize.h: Add documentation. Signed-off-by: Andrew Pinski Signed-off-by: Yury Norov --- bits/wordsize.h | 9 ++++++++ sysdeps/aarch64/bits/wordsize.h | 30 +++++++++++++++++++++++++ sysdeps/generic/stdint.h | 11 ++++++--- sysdeps/gnu/bits/utmp.h | 4 ++-- sysdeps/gnu/bits/utmpx.h | 2 +- sysdeps/mips/bits/wordsize.h | 5 +++++ sysdeps/powerpc/powerpc32/bits/wordsize.h | 4 ++++ sysdeps/powerpc/powerpc64/bits/wordsize.h | 4 ++++ sysdeps/s390/s390-32/bits/wordsize.h | 6 ++++- sysdeps/s390/s390-64/bits/wordsize.h | 6 ++++- sysdeps/sparc/sparc32/bits/wordsize.h | 4 ++++ sysdeps/sparc/sparc64/bits/wordsize.h | 4 ++++ sysdeps/tile/tilegx/bits/wordsize.h | 5 +++++ sysdeps/tile/tilepro/bits/wordsize.h | 4 ++++ sysdeps/unix/sysv/linux/alpha/bits/wordsize.h | 4 ++++ sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h | 4 ++++ sysdeps/unix/sysv/linux/sparc/bits/wordsize.h | 4 ++++ sysdeps/wordsize-32/bits/wordsize.h | 4 ++++ sysdeps/wordsize-64/bits/wordsize.h | 4 ++++ sysdeps/x86/bits/wordsize.h | 5 +++++ 20 files changed, 115 insertions(+), 8 deletions(-) create mode 100644 sysdeps/aarch64/bits/wordsize.h diff --git a/bits/wordsize.h b/bits/wordsize.h index 9ef0e85..e09f031 100644 --- a/bits/wordsize.h +++ b/bits/wordsize.h @@ -1 +1,10 @@ #error "This file must be written based on the data type sizes of the target" + +#define __WORDSIZE /* Bits ber word (size of CPU register. */ +#define __WORDSIZE32_SIZE_ULONG /* Set to 1 if port is working in 32-bit mode + on 64-bit CPU to define SIZE_MAX correctly. */ +#define __WORDSIZE32_PTRDIFF_LONG /* Likewize for PTRDIFF_MIN and PTRDIFF_MAX. */ +#define __WORDSIZE_TIME64_COMPAT32 /* Set to 1 to force time types to be 32-bit + in struct lastlog and struct utmp{,x} + if your 64-bit port should be compatible to + 32-bit old ports. */ diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h new file mode 100644 index 0000000..fd357cf --- /dev/null +++ b/sysdeps/aarch64/bits/wordsize.h @@ -0,0 +1,30 @@ +/* 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 + . */ + +#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 __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 4427627..3d26d0b 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) +# 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'. */ @@ -260,7 +265,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..6d4bd7d 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -20,4 +20,9 @@ #define __WORDSIZE _MIPS_SZPTR #if _MIPS_SIM == _ABI64 # define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/powerpc/powerpc32/bits/wordsize.h b/sysdeps/powerpc/powerpc32/bits/wordsize.h index f31ac9a..dc32377 100644 --- a/sysdeps/powerpc/powerpc32/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc32/bits/wordsize.h @@ -5,4 +5,8 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#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..dc32377 100644 --- a/sysdeps/powerpc/powerpc64/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc64/bits/wordsize.h @@ -5,4 +5,8 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#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..fae93c1 100644 --- a/sysdeps/s390/s390-32/bits/wordsize.h +++ b/sysdeps/s390/s390-32/bits/wordsize.h @@ -2,9 +2,10 @@ #if defined __s390x__ # define __WORDSIZE 64 +# define __WORDSIZE32_SIZE_ULONG 0 #else # define __WORDSIZE 32 -# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_SIZE_ULONG 1 #endif #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL @@ -17,3 +18,6 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif + +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/s390/s390-64/bits/wordsize.h b/sysdeps/s390/s390-64/bits/wordsize.h index da791fa..fae93c1 100644 --- a/sysdeps/s390/s390-64/bits/wordsize.h +++ b/sysdeps/s390/s390-64/bits/wordsize.h @@ -2,9 +2,10 @@ #if defined __s390x__ # define __WORDSIZE 64 +# define __WORDSIZE32_SIZE_ULONG 0 #else # define __WORDSIZE 32 -# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_SIZE_ULONG 1 #endif #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL @@ -17,3 +18,6 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif + +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/sparc/sparc32/bits/wordsize.h b/sysdeps/sparc/sparc32/bits/wordsize.h index d8fd1a5..5f8aaeb 100644 --- a/sysdeps/sparc/sparc32/bits/wordsize.h +++ b/sysdeps/sparc/sparc32/bits/wordsize.h @@ -5,4 +5,8 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#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..5f8aaeb 100644 --- a/sysdeps/sparc/sparc64/bits/wordsize.h +++ b/sysdeps/sparc/sparc64/bits/wordsize.h @@ -5,4 +5,8 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif + +#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..463e736 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 __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..9eaf74c 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 __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..e4895fc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h @@ -27,3 +27,7 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif + +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h index 3e8a1e0..0630b01 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h @@ -5,6 +5,7 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL @@ -17,3 +18,6 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif + +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h index 2d958d2..4d3578d 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h @@ -18,3 +18,7 @@ # endif # endif #endif + +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/wordsize-32/bits/wordsize.h b/sysdeps/wordsize-32/bits/wordsize.h index 2aa16bc..3574ac5 100644 --- a/sysdeps/wordsize-32/bits/wordsize.h +++ b/sysdeps/wordsize-32/bits/wordsize.h @@ -16,3 +16,7 @@ . */ #define __WORDSIZE 32 + +#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..9d6e498 100644 --- a/sysdeps/wordsize-64/bits/wordsize.h +++ b/sysdeps/wordsize-64/bits/wordsize.h @@ -16,3 +16,7 @@ . */ #define __WORDSIZE 64 + +#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..793b5fe 100644 --- a/sysdeps/x86/bits/wordsize.h +++ b/sysdeps/x86/bits/wordsize.h @@ -10,4 +10,9 @@ # 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 #endif + +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0