From patchwork Thu Nov 3 20:41:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 17170 Received: (qmail 95898 invoked by alias); 3 Nov 2016 20:41:38 -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 95843 invoked by uid 89); 3 Nov 2016 20:41:37 -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=Session, 58, 1715, logins X-HELO: NAM01-BN3-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; Message-ID: <1478205681.4630.15.camel@caviumnetworks.com> Subject: Re: [PATCH] Define wordsize.h macros everywhere From: Steve Ellcey To: Adhemerval Zanella , Date: Thu, 3 Nov 2016 13:41:21 -0700 In-Reply-To: <1477670840.2891.6.camel@caviumnetworks.com> References: <1477670840.2891.6.camel@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: MWHPR18CA0006.namprd18.prod.outlook.com (10.173.238.144) To SN2PR0701MB1071.namprd07.prod.outlook.com (10.160.59.17) X-MS-Office365-Filtering-Correlation-Id: 616805f7-9ea8-44d0-fa1d-08d40429c744 X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 2:iY8AIcZ4JxV9F5Up4u3wVfCCL2s1DfUdrCTG2UhV2dTFWF7AVBnrZcX/2wKvmG1sQmhRkO5XwW0X/0qAnsVkfzuJ2NmCW8kULmZl9iYk67sftBr0vlL8p3bR50qheB1k5SgpA2/jJtpvZhgpVFgNWqagMXSh13hAHWPYuPnn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zvKyCKmB4spUn0eLeHVMdkh4WXA72jeU2IijiDeqT58NfnREErUVkwXk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:SN2PR0701MB1071; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1071; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 4:zSa8is0NSux3dhjsikYi4mT9UtoVumWscNLYWwSCFw+vZHdlmYpCMKzzixr0fISGgBk2VH+LqWb2N2k4De91hTcuolQq3J/6XsJVoYE/fStxSbHoW09HZZ0IdbkWEtEeE1atiMVCxsdKhysPxU5W31P8as6GZsNwowlkSlljI11PEdwXb1oX/zZswRU5A/bxkiaO2S4bZX54ZHgzPclwck21TCLRLB9d4VkuqenYnrqt3y1P6u//8mmYgVV23aErWNuPH3GwmyR+cJHlMYdZDgHZDOHHGyOaHkaUme0qixNE2egxWfrbLqSzknTVnCGsqoyvlkJ0a9iB21MvMHmmLNswkXb5MaVT9s0H5AtWBRyf40IctVf9+6jjWqi7l7qYM6SNhY2+hkoYpR7zfJFNEJjTvKdtIZhuEbg7eJJvmcUR15dPP9Ibl9DqXuPh7/p+kKAZvo7Wj/YYr6RtfyETARXBosmQn7th1cXjwIn7Vuh2uWjb0kv/fBIgv1Ytmp8o X-Forefront-PRVS: 011579F31F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7916002)(377424004)(199003)(24454002)(189002)(106356001)(4610100001)(3846002)(97736004)(6666003)(50226002)(5001770100001)(586003)(4001150100001)(6116002)(19580405001)(68736007)(5660300001)(92566002)(105586002)(101416001)(568964002)(19580395003)(15975445007)(42186005)(2950100002)(33646002)(76176999)(42882006)(53416004)(77096005)(512874002)(7846002)(66066001)(189998001)(8676002)(81156014)(103116003)(2906002)(107886002)(305945005)(2476003)(7736002)(50986999)(36756003)(81166006)(5890100001)(7906003)(19617315012)(69596002)(84326002)(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:oOfdADhddcP8xkbzKixXxvsu599Ht5/XnTmI2VP?= =?us-ascii?Q?tqxMoqRBFZBZdmxoLWwP7g2BMIZJxUhjm1mvyYBZVxSJGUxBMt51ncUJ+VMw?= =?us-ascii?Q?IUqMaReWrtl4nVHNlOckKB4YB+6OCvPxalx7o1HZNRm3StN2mJw38kdChA4i?= =?us-ascii?Q?mx5CLN2Nlwdk/wRF9TXj8/9SOwfq+dS8OI/uHc1hH1JGTJwALxBfRjGee+ql?= =?us-ascii?Q?Jg4BCBTUZQj48A0xbUeNKZ/sEotHXRl8fBZue765t7GW7Ilyea/frhyod7ln?= =?us-ascii?Q?4b2sKPpM9WosU1XaKJbMmQQJPkqCgeozp2Q7aqSvJ3x17gJe4AqwJCvXEqh6?= =?us-ascii?Q?TG0XpT02H+FAqgsuJ8XayIEBwiibvvBy6tFYipHvgZ429RFigbOLu5Dw0uW4?= =?us-ascii?Q?PyUUcAPBoSkoXfBHbg6u+P8VV/OOpCDvKJLdLCh8q92fYRici/r2ZRliKAS3?= =?us-ascii?Q?uIWOhf4AJTZs6lOI9G9ZEmyQvPm/IknwnSVbYXdHb1gXMc/wjP8h8OjB58HD?= =?us-ascii?Q?azPkZiczE7ZHhEMbgN5/Gj2aam9MGanBJ9/mYIw+Sdg0nLGasGiPpjMBYCAR?= =?us-ascii?Q?34Prc94l70zvAS0x4UHQcmuETLWirbiOrFXK57wFjCnsM6JeezObLeWkPwh9?= =?us-ascii?Q?hG0KkmaSoUrobNEo6NYtWInoPZ3yKWLHTEsU+wDwY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VR4Oyy9f3NrSAAF/pdrr6tWwCBnpiyOcebFIlqgNpY8y+C+A1T81o85ckYhP903ubEn10V1mh+HzyRa8pmC1VhUUX6bfwqQ/hpUqS97ugoz5kBnmUH0hDXh3Thsr71fpuZb0PPAiCEmNKYnnxiEZapXrlwFy; 5:pm3Ewi6Ms8kNpaLW7sJh7Xu/TttUzrVe9qF2IvkSrMy5Y3MDHFIoBBf7AKduT2Q8XooX7nmgGSVbWmol9YJB1KP3Gnj5u2aMwQWexl+isufLVqjir+e83ochYRWxs47hZbsrQW1VGru2aOD9ioMjNGzNCgJk6rFyzw2jeKhiRaY=; 24:IcLcw5aIRt22c0efe97Sozx9Hf4JN0EDP8AeqY+Dt0yfC6nWnRYabGBu1zXgwFIFd+qcyJxGrO2BlvtdDGlZPybS4gwYqnA2WMgcuD36WhE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 7:RmJLentx6m3Drf9unDQVPf2LkTeXrMtMEMmOaxz8qRDae69xfiVHCkXgXnHQ6LU3Ks10fLqYA1PXX3bFCbvlOIgAKVzjF4v8MX9x/IXXLdeucyIqokJH40B6U6kOfmwRBPzZb58srifDxYZQddznBdf3gJefa68Oiv0JUNAP9CizSgJAGMs6b8CEiPGVySGmaAOoi5WjMKYAFlkqpwr0vf9Pu+fXmFT5aDXIyIbkNZbq3TdWacNKN/7OkFX7OZ0r/fADpzw6G8QNaNjwKnr2y6XD6WB2IrQT/b6zpIGbcZGN+8klcnAiOmZ0/QRsUWGtvJy3zeOqxdiYZFfgD8t4ESQS/PuIXJLGKrInoiO67pA= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2016 20:41:24.5856 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1071 On Fri, 2016-10-28 at 09:07 -0700, Steve Ellcey wrote: > On Thu, 2016-10-27 at 18:16 -0200, Adhemerval Zanella wrote: > > > > > > On 27/10/2016 16:45, Steve Ellcey wrote: > > > > > > > >   > > > +   You should have received a copy of the GNU Lesser General > > > Public > > > +   License along with the GNU C Library; if not, see > > > +   < > > href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/< > > > /a > > > > > > > > >.  */ > > > > I think you editor added some http tag on this URL. > Actually, it looks like it got messed up in my patch.  I have fixed > it locally and can resubmit the patch if necessary. > > Steve Ellcey > sellcey@caviumnetworks.com Here is a ping/repost of this patch with the comment fixed. This patch defines macros in the various wordsize.h files so they can be used without having to check if they are defined first and adds documentation about what they do in bits/wordsize.h. Steve Ellcey sellcey@caviumnetworks.com 2016-11-03  Yury Norov               Steve Ellcey         * bits/wordsize.h: Add documentation.         * sysdeps/aarch64/bits/wordsize.h : New file         * sysdeps/generic/stdint.h (PTRDIFF_MIN, PTRDIFF_MAX): Update         definitions.         (SIZE_MAX): Change ifdef to if in __WORDSIZE32_SIZE_ULONG check.         * sysdeps/gnu/bits/utmp.h (__WORDSIZE_TIME64_COMPAT32): Check         with #if instead of #ifdef.         * sysdeps/gnu/bits/utmpx.h (__WORDSIZE_TIME64_COMPAT32): Ditto.         * sysdeps/mips/bits/wordsize.h (__WORDSIZE32_SIZE_ULONG,         __WORDSIZE32_PTRDIFF_LONG, __WORDSIZE_TIME64_COMPAT32):         Add or change defines.         * 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. diff --git a/bits/wordsize.h b/bits/wordsize.h index 9ef0e85..14edae3 100644 --- a/bits/wordsize.h +++ b/bits/wordsize.h @@ -1 +1,27 @@ #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. */ + +/* Size in bits of the 'long int' and pointer types. */ +#define __WORDSIZE + +/* This should be set to 1 if __WORDSIZE is 32 and size_t is type + 'unsigned long' instead of type 'unsigned int'. This will ensure + that SIZE_MAX is defined as an unsigned long constant instead of an + unsigned int constant. Set to 0 if __WORDSIZE is 32 and size_t is + 'unsigned int' and leave undefined if __WORDSIZE is 64. */ +#define __WORDSIZE32_SIZE_ULONG + +/* This should be set to 1 if __WORDSIZE is 32 and ptrdiff_t is type 'long' + instead of type 'int'. This will ensure that PTRDIFF_MIN and PTRDIFF_MAX + are defined as long constants instead of int constants. Set to 0 if + __WORDSIZE is 32 and ptrdiff_t is type 'int' and leave undefined if + __WORDSIZE is 64. */ +#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..6f0a958 100644 --- a/sysdeps/aarch64/bits/wordsize.h +++ 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 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..7a3546b 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -17,7 +17,15 @@ #include -#define __WORDSIZE _MIPS_SZPTR +#define __WORDSIZE _MIPS_SZPTR + #if _MIPS_SIM == _ABI64 # define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE_TIME64_COMPAT32 0 +#endif + +#if __WORDSIZE == 32 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 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..c7a5fbf 100644 --- a/sysdeps/s390/s390-32/bits/wordsize.h +++ b/sysdeps/s390/s390-32/bits/wordsize.h @@ -5,8 +5,11 @@ #else # define __WORDSIZE 32 # 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..31e0ec6 100644 --- a/sysdeps/s390/s390-64/bits/wordsize.h +++ b/sysdeps/s390/s390-64/bits/wordsize.h @@ -5,8 +5,11 @@ #else # define __WORDSIZE 32 # 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..8281538 100644 --- a/sysdeps/tile/tilepro/bits/wordsize.h +++ b/sysdeps/tile/tilepro/bits/wordsize.h @@ -1,3 +1,4 @@ /* Determine the wordsize from the preprocessor defines. */ -#define __WORDSIZE 32 +#define __WORDSIZE 32 +#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..f0961f6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h @@ -16,6 +16,7 @@ . */ #define __WORDSIZE 64 +#define __WORDSIZE_TIME64_COMPAT32 0 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL 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..76d6579 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h @@ -4,6 +4,8 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 +# 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/wordsize-32/bits/wordsize.h b/sysdeps/wordsize-32/bits/wordsize.h index 2aa16bc..a251f3a 100644 --- a/sysdeps/wordsize-32/bits/wordsize.h +++ b/sysdeps/wordsize-32/bits/wordsize.h @@ -15,4 +15,7 @@ License along with the GNU C Library; if not, see . */ -#define __WORDSIZE 32 +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 0 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/wordsize-64/bits/wordsize.h b/sysdeps/wordsize-64/bits/wordsize.h index 0944f9e..8b5c502 100644 --- a/sysdeps/wordsize-64/bits/wordsize.h +++ b/sysdeps/wordsize-64/bits/wordsize.h @@ -15,4 +15,5 @@ License along with the GNU C Library; if not, see . */ -#define __WORDSIZE 64 +#define __WORDSIZE 64 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/sysdeps/x86/bits/wordsize.h b/sysdeps/x86/bits/wordsize.h index e25af28..70f652b 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