This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] all: #define wordsize-related macros everywhere
- From: Andreas Schwab <schwab at suse dot de>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: <libc-alpha at sourceware dot org>, <joseph at codesourcery dot com>, <adhemerval dot zanella at linaro dot org>, <arnd at arndb dot de>, <catalin dot marinas at arm dot com>, <davem at davemloft dot net>, <szabolcs dot nagy at arm dot com>, <maxim dot kuvyrkov at linaro dot org>, <pinskia at gmail dot com>, <bamvor dot zhangjian at huawei dot com>, <fweimer at redhat dot com>, <Prasun dot Kapoor at cavium dot com>, Andrew Pinski <apinski at cavium dot com>
- Date: Thu, 18 Aug 2016 09:13:56 +0200
- Subject: Re: [PATCH v3] all: #define wordsize-related macros everywhere
- Authentication-results: sourceware.org; auth=none
- References: <1469515124-28190-1-git-send-email-ynorov@caviumnetworks.com>
On Jul 26 2016, Yury Norov <ynorov@caviumnetworks.com> wrote:
> 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. */
s/ber/per/; missing paren.
> +#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. */
s/Likewize/Likewise/
> +#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. */
Please put the comments in front of the definitions to avoid overlong
lines.
> 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
Missing newline.
> 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 @@
> <http://www.gnu.org/licenses/>. */
>
> #define __WORDSIZE 32
> +
> +#define __WORDSIZE32_SIZE_ULONG 0
> +#define __WORDSIZE32_PTRDIFF_LONG 0
> +#define __WORDSIZE_TIME64_COMPAT32 0
> \ No newline at end of file
Missing newline.
> 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 @@
> <http://www.gnu.org/licenses/>. */
>
> #define __WORDSIZE 64
> +
> +#define __WORDSIZE_TIME64_COMPAT32 0
> \ No newline at end of file
Missing newline.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."