From patchwork Tue Jul 26 06:38:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 72766 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1520271qga; Mon, 25 Jul 2016 23:39:23 -0700 (PDT) X-Received: by 10.98.102.221 with SMTP id s90mr36173603pfj.69.1469515163038; Mon, 25 Jul 2016 23:39:23 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o7si37698009pae.4.2016.07.25.23.39.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jul 2016 23:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-72025-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-72025-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-72025-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:from:to:cc:subject:date:message-id :mime-version:content-type; q=dns; s=default; b=Gb+6DQfpGmEZs63d kiJ9WEaeOuKxl+9pWBSu2Udn57cuBJbTeFR23fNdRlaP+QLWi9UKLWOCdHn4iUwM 3zSnyTc+/aCL/5EPZlVEIf2toAJmHUT/oKbhnLEaUON1eUjRqgaRZgoNMzQ47eOA /hsSFA/5IR3FgUXYApA+Depz6ik= 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:cc:subject:date:message-id :mime-version:content-type; s=default; bh=G2Ae79EUiQP4ltzdVZv3PA tSmGA=; b=hQFyLdNfV5+GzCehDM4CO/H8JiSYh/xFiUfrp+wGQNWEWfe5LU6S4C YqsF+fpyX9z22UQ83vCDaQ46NM6a7gQh+ZqQ3ZBqW4s7HqtlwSznctREh4zti7fq 9u4OtYeve59sZdPcBN5N0jTiSMGdKNmnhfcYnp72gmplq1QCbpYJc= Received: (qmail 99615 invoked by alias); 26 Jul 2016 06:39:11 -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 99596 invoked by uid 89); 26 Jul 2016 06:39:10 -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=2657, HX-HELO:sk:NAM02-B, H*RU:sk:mail-bl, Hx-spam-relays-external:sk:mail-bl X-HELO: NAM02-BL2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , CC: , , , , , , , , , , Andrew Pinski , Yury Norov Subject: [PATCH v3] all: #define wordsize-related macros everywhere Date: Tue, 26 Jul 2016 09:38:44 +0300 Message-ID: <1469515124-28190-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: AMSPR04CA0040.eurprd04.prod.outlook.com (10.242.87.158) To BN4PR07MB2241.namprd07.prod.outlook.com (10.164.63.147) X-MS-Office365-Filtering-Correlation-Id: 243a50e7-942a-4cc3-3e06-08d3b51f83d8 X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2241; 2:62dksGQ+z4aHOaNhkboyILJsHckdV6L/A1kIA0tXrSMxz9Cw9P7GtqhQoGesslT+Ski2f+F6gFRB4L4zptug0POP+eQeHTduqszoYfPvlzG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BRFsi8U5P0zpmWd8UXDVNJ6wB4Kzm4Mr8m9wW9L0PM+zD5I5sjVj4wyKW8Lq8pop9LImK/Hlj6Lw03Jjcy9CaTnLULVSMnY+UQ2odxt1XV/MJbeCwcXJF2I5500739cCER8nk+/O7WJiLhkWoMugu7YQAWuthA3Vdd9O613bW3NV3e2KbF3CAHznoNa+39WceD/jsn1HEmyZjBLbbmVRIkqj4CeGzgOb/5+fRuKQrZrsa8/2iPrOCEwAXZy1xFDVq6rd1GUvHpZG5QdLq7g22y9aINHt3FBUgX3k9GhuJF7R102gpA8a+sxEyveUDoJuT+K1BVDN0wH93pek5EWHSLTLGY3LJv9u0d20lHi7yBppHmy7jcb1ZRaZ5G7gARjEKyFLNEBJ+N3mOwGMPnq8GZO/LW9Px7t4iC6QCz9fC+VIcyhMY0MlxNRfwo7f2ta2G0GwsOuv7HH21mzPd8LchFdC0UzofOOaQMb4ZOBAwkStcSZsIq86+LsLoFqlGZZWNSQdvq3Jo= 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)(8121501046)(5005006)(3002001)(10201501046); SRVR:BN4PR07MB2241; BCL:0; PCL:0; RULEID:; SRVR:BN4PR07MB2241; X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2241; 4:jgp2JQvB2HA4/DkDM9IXBugpCngpa2iBmsOjjvIYBVoDz8QFU+XemUxjpNu726zxZ3YBjTw23IV700N78UcFm/0FU0VCp2HRjSgv5+cX83qzcg9GH5bYOt1GlQ0Mtwk0KkH6U4JwOWfJqXMpdy5kcZ+xV7AReWAl8pbsPCSOLKHHvARvDJUaYUabCsnWz6fA0QsCzumYvVsNRe2yE1P2OqAdwgvuDNmBzRLGavYs7XzwSvYQU6zh6IvXVCj9bCb/kxyt1b03vkLu9lBsbNWhkzINc6V1lFXRJGzI8cxv3KGBl9bZk/YOGnilqo9B0cQtzT9828zJFHJCERTVpJZqv00loLSERrCkTa2QD/BiJKdWT1HPu6R68QngqmRh7CIgZwb0PP8OQddqrew4faKLkC1gV6xDk6hN6XRHMeEU/KRKpDqqIsbTJoV0i+3tHg4Dqgjefk96DAwP3OekCdv+KQ== X-Forefront-PRVS: 00159D1518 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(48376002)(77096005)(81156014)(2201001)(106356001)(8676002)(229853001)(4326007)(107886002)(2906002)(305945005)(81166006)(575784001)(50466002)(15975445007)(97736004)(92566002)(5001770100001)(4001430100002)(189998001)(50226002)(7846002)(7736002)(42186005)(76506005)(19580395003)(19580405001)(3846002)(68736007)(6116002)(105586002)(586003)(33646002)(50986999)(36756003)(101416001)(5003940100001)(47776003)(66066001)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN4PR07MB2241; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; BN4PR07MB2241; 23:HO/H4Wi4OHPT6js1amcs903FHnk3k3uYfT22YOJwC?= =?us-ascii?Q?mfYPIUhjN5UJPn1+hXdQRzF6606grbROAQNDtsEiUhQ5UiVMBTkJsj7eDcWD?= =?us-ascii?Q?lGtEkW3Tp0a6Ym+98Fw6uzSIAC4OvMBWPfhGKseArloPCh2vlotUAlKgnnLy?= =?us-ascii?Q?AVzSEWFAX0/C2Bkwy+G02i/1XA1M+OfSkTpD6PR9BPUZmpZC8yDarBAlyjEe?= =?us-ascii?Q?nXUb2LOZwFqzP6M7v6pb7RhgYHhkeRE3ikYB/uduV4cpvrbYtoj4Vmrw5zqu?= =?us-ascii?Q?uvlyhjeU+ZmMxJzA1kw1pOg3ygqrEecHfah+ggmW6bcpqPA3bOEcbeDx51GO?= =?us-ascii?Q?QfOuZzMkNwRwCA6Euavq4NZ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Ke6aEvYKdVjmWTwXAkxjKfvqWZ6OzdNPO/lq8NEDStSgbQmJUutlhV3jPjaya/Je2TxaDqYc7CBw0TPz7V3+09pUFdC7xDlJceGHm2X8keVCR8NHr2llBOm3OG9FBVYCvF7YCS4XCJdKVvlqotQJif2TMvEwK/t8t9r5clc0NEff+WLo1G3qsKmHbnb3gtOPuwhKQqbHwSU3h1sTA5+0pY0hdcZSMkd9oBFzvgU4YZkAFpWwDWqxzZJBbB6HTtW7DWVNkyploDd8yPmKbhVL+mIbcXiOvrvK5o33wjw6hfg=; 5:RdHO0i2eP0wR3qYpoQsfXQak0GRCSe+eWyO2bMtyj5DdEkO/BIPqxAenz4LX7+b2P8lyC15PMIlKIORbZEt48p7CZ6IgwzYTT/zrzcPJ5DordM5LSQk13/AzqyRNbW8BHHdOYWFBqJ3plxxbAhfv4A==; 24:ClTPSiK4Nx/x0yE4n4LTGbfBvCz4J/F78pobPJRmywK8lFsi1GPn2h5MoP6ovgN4iO3Gdl3cakpN95ANfMKemRXZC85xiHch+sH5e2bMjKs=; 7:+aM1dqIsOFoN/JkGQ0VeeSpKpHgWMe39aZiEdisoDFSPbm3Hg5kZZ8O4Pb6Rcy6rVpKkU968U0MMEyC5ZUfCC5bKnhClO9oEFDCpErDdwy/roFPiZA5ALeUXWPdN0hsAZeFJG4yZTWY8UKJY7VVcBGUdx/GX6kSwRj5JFXRbndAA0+StMwIczmrccQbTPEkES3VqbWKKIrTBxKNOl/KGY1uB63Dsde0WQHkHwgWGc95WrjfgaGFP96IDLT3D532F SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2016 06:38:54.6789 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2241 From: Andrew Pinski __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. v3: - __WORDSIZE32_* are meaningless with __WORDSIZE == 64 and left undefined in that case. * sysdeps/aarch64/bits/wordsize.h : New file (__WORDSIZE32_SIZE_ULONG): 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 | 10 +++++++++ sysdeps/aarch64/bits/wordsize.h | 28 +++++++++++++++++++++++++ sysdeps/generic/stdint.h | 11 +++++++--- sysdeps/gnu/bits/utmp.h | 4 ++-- sysdeps/gnu/bits/utmpx.h | 2 +- sysdeps/mips/bits/wordsize.h | 4 ++++ sysdeps/powerpc/powerpc32/bits/wordsize.h | 3 +++ sysdeps/powerpc/powerpc64/bits/wordsize.h | 3 +++ sysdeps/s390/s390-32/bits/wordsize.h | 5 ++++- sysdeps/s390/s390-64/bits/wordsize.h | 5 ++++- sysdeps/sparc/sparc32/bits/wordsize.h | 3 +++ sysdeps/sparc/sparc64/bits/wordsize.h | 3 +++ sysdeps/tile/tilegx/bits/wordsize.h | 3 +++ sysdeps/tile/tilepro/bits/wordsize.h | 4 ++++ sysdeps/unix/sysv/linux/alpha/bits/wordsize.h | 2 ++ sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h | 3 +++ sysdeps/unix/sysv/linux/sparc/bits/wordsize.h | 4 ++++ sysdeps/wordsize-32/bits/wordsize.h | 4 ++++ sysdeps/wordsize-64/bits/wordsize.h | 2 ++ sysdeps/x86/bits/wordsize.h | 4 ++++ 20 files changed, 99 insertions(+), 8 deletions(-) create mode 100644 sysdeps/aarch64/bits/wordsize.h -- 2.7.4 diff --git a/bits/wordsize.h b/bits/wordsize.h index 9ef0e85..29fa8ff 100644 --- a/bits/wordsize.h +++ b/bits/wordsize.h @@ -1 +1,11 @@ #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. + Keep undefined for 64-bit ports. */ +#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..eadbb48 --- /dev/null +++ b/sysdeps/aarch64/bits/wordsize.h @@ -0,0 +1,28 @@ +/* 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 +#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..2f4756e 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -20,4 +20,8 @@ #define __WORDSIZE _MIPS_SZPTR #if _MIPS_SIM == _ABI64 # define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 +# define __WORDSIZE_TIME64_COMPAT32 0 #endif diff --git a/sysdeps/powerpc/powerpc32/bits/wordsize.h b/sysdeps/powerpc/powerpc32/bits/wordsize.h index f31ac9a..04ca9de 100644 --- a/sysdeps/powerpc/powerpc32/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc32/bits/wordsize.h @@ -5,4 +5,7 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif diff --git a/sysdeps/powerpc/powerpc64/bits/wordsize.h b/sysdeps/powerpc/powerpc64/bits/wordsize.h index f31ac9a..04ca9de 100644 --- a/sysdeps/powerpc/powerpc64/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc64/bits/wordsize.h @@ -5,4 +5,7 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif diff --git a/sysdeps/s390/s390-32/bits/wordsize.h b/sysdeps/s390/s390-32/bits/wordsize.h index da791fa..bc71b07 100644 --- a/sysdeps/s390/s390-32/bits/wordsize.h +++ b/sysdeps/s390/s390-32/bits/wordsize.h @@ -4,9 +4,12 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 -# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#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..bc71b07 100644 --- a/sysdeps/s390/s390-64/bits/wordsize.h +++ b/sysdeps/s390/s390-64/bits/wordsize.h @@ -4,9 +4,12 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 -# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#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..2f66f10 100644 --- a/sysdeps/sparc/sparc32/bits/wordsize.h +++ b/sysdeps/sparc/sparc32/bits/wordsize.h @@ -5,4 +5,7 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif diff --git a/sysdeps/sparc/sparc64/bits/wordsize.h b/sysdeps/sparc/sparc64/bits/wordsize.h index d8fd1a5..2f66f10 100644 --- a/sysdeps/sparc/sparc64/bits/wordsize.h +++ b/sysdeps/sparc/sparc64/bits/wordsize.h @@ -5,4 +5,7 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif diff --git a/sysdeps/tile/tilegx/bits/wordsize.h b/sysdeps/tile/tilegx/bits/wordsize.h index 5d4e4b4..9dc4da5 100644 --- a/sysdeps/tile/tilegx/bits/wordsize.h +++ b/sysdeps/tile/tilegx/bits/wordsize.h @@ -5,4 +5,7 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif diff --git a/sysdeps/tile/tilepro/bits/wordsize.h b/sysdeps/tile/tilepro/bits/wordsize.h index da587a2..eb9b3c1 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 \ No newline at end of file diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h index 51fc433..1b27601 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h @@ -17,6 +17,8 @@ #define __WORDSIZE 64 +#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/unix/sysv/linux/powerpc/bits/wordsize.h b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h index 3e8a1e0..109f08c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h @@ -5,6 +5,9 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL diff --git a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h index 2d958d2..3564bb1 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h @@ -4,8 +4,12 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#define __WORDSIZE_TIME64_COMPAT32 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..acb3b14 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 \ No newline at end of file diff --git a/sysdeps/wordsize-64/bits/wordsize.h b/sysdeps/wordsize-64/bits/wordsize.h index 0944f9e..04eb0f6 100644 --- a/sysdeps/wordsize-64/bits/wordsize.h +++ b/sysdeps/wordsize-64/bits/wordsize.h @@ -16,3 +16,5 @@ . */ #define __WORDSIZE 64 + +#define __WORDSIZE_TIME64_COMPAT32 0 \ No newline at end of file diff --git a/sysdeps/x86/bits/wordsize.h b/sysdeps/x86/bits/wordsize.h index e25af28..530d253 100644 --- a/sysdeps/x86/bits/wordsize.h +++ b/sysdeps/x86/bits/wordsize.h @@ -4,10 +4,14 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif #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 #endif