This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] all: #define wordsize-related macros everywhere


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]