Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bits
File: byteswap.h
/* Macros and inline functions to swap the order of bytes in integer values.
[0] Fix | Delete
Copyright (C) 1997-2018 Free Software Foundation, Inc.
[1] Fix | Delete
This file is part of the GNU C Library.
[2] Fix | Delete
[3] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Lesser General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[14] Fix | Delete
License along with the GNU C Library; if not, see
[15] Fix | Delete
<http://www.gnu.org/licenses/>. */
[16] Fix | Delete
[17] Fix | Delete
#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
[18] Fix | Delete
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
[19] Fix | Delete
#endif
[20] Fix | Delete
[21] Fix | Delete
#ifndef _BITS_BYTESWAP_H
[22] Fix | Delete
#define _BITS_BYTESWAP_H 1
[23] Fix | Delete
[24] Fix | Delete
#include <features.h>
[25] Fix | Delete
#include <bits/types.h>
[26] Fix | Delete
[27] Fix | Delete
/* Swap bytes in 16-bit value. */
[28] Fix | Delete
#define __bswap_constant_16(x) \
[29] Fix | Delete
((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
[30] Fix | Delete
[31] Fix | Delete
static __inline __uint16_t
[32] Fix | Delete
__bswap_16 (__uint16_t __bsx)
[33] Fix | Delete
{
[34] Fix | Delete
#if __GNUC_PREREQ (4, 8)
[35] Fix | Delete
return __builtin_bswap16 (__bsx);
[36] Fix | Delete
#else
[37] Fix | Delete
return __bswap_constant_16 (__bsx);
[38] Fix | Delete
#endif
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
/* Swap bytes in 32-bit value. */
[42] Fix | Delete
#define __bswap_constant_32(x) \
[43] Fix | Delete
((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \
[44] Fix | Delete
| (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
[45] Fix | Delete
[46] Fix | Delete
static __inline __uint32_t
[47] Fix | Delete
__bswap_32 (__uint32_t __bsx)
[48] Fix | Delete
{
[49] Fix | Delete
#if __GNUC_PREREQ (4, 3)
[50] Fix | Delete
return __builtin_bswap32 (__bsx);
[51] Fix | Delete
#else
[52] Fix | Delete
return __bswap_constant_32 (__bsx);
[53] Fix | Delete
#endif
[54] Fix | Delete
}
[55] Fix | Delete
[56] Fix | Delete
/* Swap bytes in 64-bit value. */
[57] Fix | Delete
#define __bswap_constant_64(x) \
[58] Fix | Delete
((((x) & 0xff00000000000000ull) >> 56) \
[59] Fix | Delete
| (((x) & 0x00ff000000000000ull) >> 40) \
[60] Fix | Delete
| (((x) & 0x0000ff0000000000ull) >> 24) \
[61] Fix | Delete
| (((x) & 0x000000ff00000000ull) >> 8) \
[62] Fix | Delete
| (((x) & 0x00000000ff000000ull) << 8) \
[63] Fix | Delete
| (((x) & 0x0000000000ff0000ull) << 24) \
[64] Fix | Delete
| (((x) & 0x000000000000ff00ull) << 40) \
[65] Fix | Delete
| (((x) & 0x00000000000000ffull) << 56))
[66] Fix | Delete
[67] Fix | Delete
__extension__ static __inline __uint64_t
[68] Fix | Delete
__bswap_64 (__uint64_t __bsx)
[69] Fix | Delete
{
[70] Fix | Delete
#if __GNUC_PREREQ (4, 3)
[71] Fix | Delete
return __builtin_bswap64 (__bsx);
[72] Fix | Delete
#else
[73] Fix | Delete
return __bswap_constant_64 (__bsx);
[74] Fix | Delete
#endif
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
#endif /* _BITS_BYTESWAP_H */
[78] Fix | Delete
[79] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function