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: S390: Fix build failure in test string/tst-endian.c with gcc 6.


Stefan Liebler <stli@linux.vnet.ibm.com> writes:

> diff --git a/string/tst-endian.c b/string/tst-endian.c
> index 8684bb2..d093587 100644
> --- a/string/tst-endian.c
> +++ b/string/tst-endian.c
> @@ -13,12 +13,14 @@ do_test (void)
>      {
>        if (i < UINT64_C (65536))
>  	{
> +#if __BYTE_ORDER == __LITTLE_ENDIAN
>  	  if (htobe16 (be16toh (i)) != i)
>  	    {
>  	      printf ("htobe16 (be16toh (%" PRIx64 ")) == %" PRIx16 "\n",
>  		      i, (uint16_t) htobe16 (be16toh (i)));
>  	      result = 1;
>  	    }
> +#endif

Does that also work when using if (__BYTE_ORDER == __LITTLE_ENDIAN)?

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]