mirror of git://sourceware.org/git/glibc.git
Prevent warnings due to long long constants
This commit is contained in:
parent
bbe315ea36
commit
67371b5666
|
@ -1,3 +1,11 @@
|
||||||
|
2011-12-23 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
|
* bits/byteswap.h: Protect long long constants with __extension__.
|
||||||
|
* sysdeps/i386/bits/byteswap.h: Likewise.
|
||||||
|
* sysdeps/ia64/bits/byteswap.h: Likewise.
|
||||||
|
* sysdeps/s390/bits/byteswap.h: Likewise.
|
||||||
|
* sysdeps/x86_64/bits/byteswap.h: Likewise.
|
||||||
|
|
||||||
2011-12-23 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
|
2011-12-23 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
|
||||||
|
|
||||||
[BZ #13540]
|
[BZ #13540]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Macros to swap the order of bytes in integer values.
|
/* Macros to swap the order of bytes in integer values.
|
||||||
Copyright (C) 1997,1998,2000-2002,2005,2008 Free Software Foundation, Inc.
|
Copyright (C) 1997,1998,2000-2002,2005,2008,2011
|
||||||
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -60,14 +61,14 @@ __bswap_32 (unsigned int __bsx)
|
||||||
#if defined __GNUC__ && __GNUC__ >= 2
|
#if defined __GNUC__ && __GNUC__ >= 2
|
||||||
/* Swap bytes in 64 bit value. */
|
/* Swap bytes in 64 bit value. */
|
||||||
# define __bswap_constant_64(x) \
|
# define __bswap_constant_64(x) \
|
||||||
((((x) & 0xff00000000000000ull) >> 56) \
|
(__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
|
||||||
| (((x) & 0x00ff000000000000ull) >> 40) \
|
| (((x) & 0x00ff000000000000ull) >> 40) \
|
||||||
| (((x) & 0x0000ff0000000000ull) >> 24) \
|
| (((x) & 0x0000ff0000000000ull) >> 24) \
|
||||||
| (((x) & 0x000000ff00000000ull) >> 8) \
|
| (((x) & 0x000000ff00000000ull) >> 8) \
|
||||||
| (((x) & 0x00000000ff000000ull) << 8) \
|
| (((x) & 0x00000000ff000000ull) << 8) \
|
||||||
| (((x) & 0x0000000000ff0000ull) << 24) \
|
| (((x) & 0x0000000000ff0000ull) << 24) \
|
||||||
| (((x) & 0x000000000000ff00ull) << 40) \
|
| (((x) & 0x000000000000ff00ull) << 40) \
|
||||||
| (((x) & 0x00000000000000ffull) << 56))
|
| (((x) & 0x00000000000000ffull) << 56)))
|
||||||
|
|
||||||
# define __bswap_64(x) \
|
# define __bswap_64(x) \
|
||||||
(__extension__ \
|
(__extension__ \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Macros to swap the order of bytes in integer values.
|
/* Macros to swap the order of bytes in integer values.
|
||||||
Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010
|
Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010, 2011
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
@ -109,15 +109,15 @@ __bswap_32 (unsigned int __bsx)
|
||||||
|
|
||||||
#if defined __GNUC__ && __GNUC__ >= 2
|
#if defined __GNUC__ && __GNUC__ >= 2
|
||||||
/* Swap bytes in 64 bit value. */
|
/* Swap bytes in 64 bit value. */
|
||||||
#define __bswap_constant_64(x) \
|
# define __bswap_constant_64(x) \
|
||||||
((((x) & 0xff00000000000000ull) >> 56) \
|
(__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
|
||||||
| (((x) & 0x00ff000000000000ull) >> 40) \
|
| (((x) & 0x00ff000000000000ull) >> 40) \
|
||||||
| (((x) & 0x0000ff0000000000ull) >> 24) \
|
| (((x) & 0x0000ff0000000000ull) >> 24) \
|
||||||
| (((x) & 0x000000ff00000000ull) >> 8) \
|
| (((x) & 0x000000ff00000000ull) >> 8) \
|
||||||
| (((x) & 0x00000000ff000000ull) << 8) \
|
| (((x) & 0x00000000ff000000ull) << 8) \
|
||||||
| (((x) & 0x0000000000ff0000ull) << 24) \
|
| (((x) & 0x0000000000ff0000ull) << 24) \
|
||||||
| (((x) & 0x000000000000ff00ull) << 40) \
|
| (((x) & 0x000000000000ff00ull) << 40) \
|
||||||
| (((x) & 0x00000000000000ffull) << 56))
|
| (((x) & 0x00000000000000ffull) << 56)))
|
||||||
|
|
||||||
# define __bswap_64(x) \
|
# define __bswap_64(x) \
|
||||||
(__extension__ \
|
(__extension__ \
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Macros to swap the order of bytes in integer values.
|
/* Macros to swap the order of bytes in integer values.
|
||||||
Copyright (C) 1997,1998,2000,2002,2003,2008 Free Software Foundation, Inc.
|
Copyright (C) 1997,1998,2000,2002,2003,2008,2011
|
||||||
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -77,17 +78,17 @@ __bswap_32 (unsigned int __bsx)
|
||||||
|
|
||||||
|
|
||||||
/* Swap bytes in 64 bit value. */
|
/* Swap bytes in 64 bit value. */
|
||||||
#define __bswap_constant_64(x) \
|
#if defined __GNUC__ && __GNUC__ >= 2
|
||||||
((((x) & 0xff00000000000000ul) >> 56) \
|
# define __bswap_constant_64(x) \
|
||||||
|
(__extension__ ((((x) & 0xff00000000000000ul) >> 56) \
|
||||||
| (((x) & 0x00ff000000000000ul) >> 40) \
|
| (((x) & 0x00ff000000000000ul) >> 40) \
|
||||||
| (((x) & 0x0000ff0000000000ul) >> 24) \
|
| (((x) & 0x0000ff0000000000ul) >> 24) \
|
||||||
| (((x) & 0x000000ff00000000ul) >> 8) \
|
| (((x) & 0x000000ff00000000ul) >> 8) \
|
||||||
| (((x) & 0x00000000ff000000ul) << 8) \
|
| (((x) & 0x00000000ff000000ul) << 8) \
|
||||||
| (((x) & 0x0000000000ff0000ul) << 24) \
|
| (((x) & 0x0000000000ff0000ul) << 24) \
|
||||||
| (((x) & 0x000000000000ff00ul) << 40) \
|
| (((x) & 0x000000000000ff00ul) << 40) \
|
||||||
| (((x) & 0x00000000000000fful) << 56))
|
| (((x) & 0x00000000000000fful) << 56)))
|
||||||
|
|
||||||
#if defined __GNUC__ && __GNUC__ >= 2
|
|
||||||
# define __bswap_64(x) \
|
# define __bswap_64(x) \
|
||||||
(__extension__ \
|
(__extension__ \
|
||||||
({ register unsigned long int __v, __x = (x); \
|
({ register unsigned long int __v, __x = (x); \
|
||||||
|
@ -100,6 +101,16 @@ __bswap_32 (unsigned int __bsx)
|
||||||
__v; }))
|
__v; }))
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
# define __bswap_constant_64(x) \
|
||||||
|
((((x) & 0xff00000000000000ul) >> 56) \
|
||||||
|
| (((x) & 0x00ff000000000000ul) >> 40) \
|
||||||
|
| (((x) & 0x0000ff0000000000ul) >> 24) \
|
||||||
|
| (((x) & 0x000000ff00000000ul) >> 8) \
|
||||||
|
| (((x) & 0x00000000ff000000ul) << 8) \
|
||||||
|
| (((x) & 0x0000000000ff0000ul) << 24) \
|
||||||
|
| (((x) & 0x000000000000ff00ul) << 40) \
|
||||||
|
| (((x) & 0x00000000000000fful) << 56))
|
||||||
|
|
||||||
static __inline unsigned long int
|
static __inline unsigned long int
|
||||||
__bswap_64 (unsigned long int __bsx)
|
__bswap_64 (unsigned long int __bsx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Macros to swap the order of bytes in integer values. s390 version.
|
/* Macros to swap the order of bytes in integer values. s390 version.
|
||||||
Copyright (C) 2000, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2000-2003, 2008, 2011 Free Software Foundation, Inc.
|
||||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
@ -117,13 +117,17 @@ __bswap_32 (unsigned int __bsx)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Swap bytes in 64 bit value. */
|
/* Swap bytes in 64 bit value. */
|
||||||
#define __bswap_constant_64(x) \
|
|
||||||
((((x)&0xff00000000000000) >> 56) | (((x)&0x00ff000000000000) >> 40) | \
|
|
||||||
(((x)&0x0000ff0000000000) >> 24) | (((x)&0x000000ff00000000) >> 8) | \
|
|
||||||
(((x)&0x00000000ff000000) << 8) | (((x)&0x0000000000ff0000) << 24) | \
|
|
||||||
(((x)&0x000000000000ff00) << 40) | (((x)&0x00000000000000ff) << 56))
|
|
||||||
|
|
||||||
#if defined __GNUC__ && __GNUC__ >= 2
|
#if defined __GNUC__ && __GNUC__ >= 2
|
||||||
|
# define __bswap_constant_64(x) \
|
||||||
|
(__extension__ ((((x) & 0xff00000000000000ul) >> 56) \
|
||||||
|
| (((x) & 0x00ff000000000000ul) >> 40) \
|
||||||
|
| (((x) & 0x0000ff0000000000ul) >> 24) \
|
||||||
|
| (((x) & 0x000000ff00000000ul) >> 8) \
|
||||||
|
| (((x) & 0x00000000ff000000ul) << 8) \
|
||||||
|
| (((x) & 0x0000000000ff0000ul) << 24) \
|
||||||
|
| (((x) & 0x000000000000ff00ul) << 40) \
|
||||||
|
| (((x) & 0x00000000000000fful) << 56)))
|
||||||
|
|
||||||
# if __WORDSIZE == 64
|
# if __WORDSIZE == 64
|
||||||
# define __bswap_64(x) \
|
# define __bswap_64(x) \
|
||||||
(__extension__ \
|
(__extension__ \
|
||||||
|
@ -148,6 +152,16 @@ __bswap_32 (unsigned int __bsx)
|
||||||
__r.__ll; })
|
__r.__ll; })
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
|
# define __bswap_constant_64(x) \
|
||||||
|
((((x) & 0xff00000000000000ul) >> 56) \
|
||||||
|
| (((x) & 0x00ff000000000000ul) >> 40) \
|
||||||
|
| (((x) & 0x0000ff0000000000ul) >> 24) \
|
||||||
|
| (((x) & 0x000000ff00000000ul) >> 8) \
|
||||||
|
| (((x) & 0x00000000ff000000ul) << 8) \
|
||||||
|
| (((x) & 0x0000000000ff0000ul) << 24) \
|
||||||
|
| (((x) & 0x000000000000ff00ul) << 40) \
|
||||||
|
| (((x) & 0x00000000000000fful) << 56))
|
||||||
|
|
||||||
static __inline unsigned long long int
|
static __inline unsigned long long int
|
||||||
__bswap_64 (unsigned long long int __bsx)
|
__bswap_64 (unsigned long long int __bsx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Macros to swap the order of bytes in integer values.
|
/* Macros to swap the order of bytes in integer values.
|
||||||
Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010
|
Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010, 2011
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
@ -99,14 +99,14 @@
|
||||||
#if defined __GNUC__ && __GNUC__ >= 2
|
#if defined __GNUC__ && __GNUC__ >= 2
|
||||||
/* Swap bytes in 64 bit value. */
|
/* Swap bytes in 64 bit value. */
|
||||||
# define __bswap_constant_64(x) \
|
# define __bswap_constant_64(x) \
|
||||||
((((x) & 0xff00000000000000ull) >> 56) \
|
(__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
|
||||||
| (((x) & 0x00ff000000000000ull) >> 40) \
|
| (((x) & 0x00ff000000000000ull) >> 40) \
|
||||||
| (((x) & 0x0000ff0000000000ull) >> 24) \
|
| (((x) & 0x0000ff0000000000ull) >> 24) \
|
||||||
| (((x) & 0x000000ff00000000ull) >> 8) \
|
| (((x) & 0x000000ff00000000ull) >> 8) \
|
||||||
| (((x) & 0x00000000ff000000ull) << 8) \
|
| (((x) & 0x00000000ff000000ull) << 8) \
|
||||||
| (((x) & 0x0000000000ff0000ull) << 24) \
|
| (((x) & 0x0000000000ff0000ull) << 24) \
|
||||||
| (((x) & 0x000000000000ff00ull) << 40) \
|
| (((x) & 0x000000000000ff00ull) << 40) \
|
||||||
| (((x) & 0x00000000000000ffull) << 56))
|
| (((x) & 0x00000000000000ffull) << 56)))
|
||||||
|
|
||||||
# if __WORDSIZE == 64
|
# if __WORDSIZE == 64
|
||||||
# define __bswap_64(x) \
|
# define __bswap_64(x) \
|
||||||
|
|
Loading…
Reference in New Issue