Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isc
File: endian.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#pragma once
[11] Fix | Delete
[12] Fix | Delete
#if defined(__DragonFly__) || defined(__FreeBSD__) || \
[13] Fix | Delete
defined(__NetBSD__) || defined (__OpenBSD__) || defined(__bsdi__)
[14] Fix | Delete
[15] Fix | Delete
# include <sys/endian.h>
[16] Fix | Delete
[17] Fix | Delete
/*
[18] Fix | Delete
* Recent BSDs should have [bl]e{16,32,64}toh() defined in <sys/endian.h>.
[19] Fix | Delete
* Older ones might not, but these should have the alternatively named
[20] Fix | Delete
* [bl]etoh{16,32,64}() functions defined.
[21] Fix | Delete
*/
[22] Fix | Delete
# ifndef be16toh
[23] Fix | Delete
# define be16toh(x) betoh16(x)
[24] Fix | Delete
# define le16toh(x) letoh16(x)
[25] Fix | Delete
# define be32toh(x) betoh32(x)
[26] Fix | Delete
# define le32toh(x) letoh32(x)
[27] Fix | Delete
# define be64toh(x) betoh64(x)
[28] Fix | Delete
# define le64toh(x) letoh64(x)
[29] Fix | Delete
# endif /* !be16toh */
[30] Fix | Delete
[31] Fix | Delete
#elif defined(_WIN32)
[32] Fix | Delete
[33] Fix | Delete
/*
[34] Fix | Delete
* Windows is always little-endian and has its own byte-swapping routines, so
[35] Fix | Delete
* use these.
[36] Fix | Delete
*/
[37] Fix | Delete
[38] Fix | Delete
# include <stdlib.h>
[39] Fix | Delete
[40] Fix | Delete
# define htobe16(x) _byteswap_ushort(x)
[41] Fix | Delete
# define htole16(x) (x)
[42] Fix | Delete
# define be16toh(x) _byteswap_ushort(x)
[43] Fix | Delete
# define le16toh(x) (x)
[44] Fix | Delete
[45] Fix | Delete
# define htobe32(x) _byteswap_ulong(x)
[46] Fix | Delete
# define htole32(x) (x)
[47] Fix | Delete
# define be32toh(x) _byteswap_ulong(x)
[48] Fix | Delete
# define le32toh(x) (x)
[49] Fix | Delete
[50] Fix | Delete
# define htobe64(x) _byteswap_uint64(x)
[51] Fix | Delete
# define htole64(x) (x)
[52] Fix | Delete
# define be64toh(x) _byteswap_uint64(x)
[53] Fix | Delete
# define le64toh(x) (x)
[54] Fix | Delete
[55] Fix | Delete
#elif defined __APPLE__
[56] Fix | Delete
[57] Fix | Delete
/*
[58] Fix | Delete
* macOS has its own byte-swapping routines, so use these.
[59] Fix | Delete
*/
[60] Fix | Delete
[61] Fix | Delete
# include <libkern/OSByteOrder.h>
[62] Fix | Delete
[63] Fix | Delete
# define htobe16(x) OSSwapHostToBigInt16(x)
[64] Fix | Delete
# define htole16(x) OSSwapHostToLittleInt16(x)
[65] Fix | Delete
# define be16toh(x) OSSwapBigToHostInt16(x)
[66] Fix | Delete
# define le16toh(x) OSSwapLittleToHostInt16(x)
[67] Fix | Delete
[68] Fix | Delete
# define htobe32(x) OSSwapHostToBigInt32(x)
[69] Fix | Delete
# define htole32(x) OSSwapHostToLittleInt32(x)
[70] Fix | Delete
# define be32toh(x) OSSwapBigToHostInt32(x)
[71] Fix | Delete
# define le32toh(x) OSSwapLittleToHostInt32(x)
[72] Fix | Delete
[73] Fix | Delete
# define htobe64(x) OSSwapHostToBigInt64(x)
[74] Fix | Delete
# define htole64(x) OSSwapHostToLittleInt64(x)
[75] Fix | Delete
# define be64toh(x) OSSwapBigToHostInt64(x)
[76] Fix | Delete
# define le64toh(x) OSSwapLittleToHostInt64(x)
[77] Fix | Delete
[78] Fix | Delete
#elif defined(sun) || defined(__sun) || defined(__SVR4)
[79] Fix | Delete
[80] Fix | Delete
/*
[81] Fix | Delete
* For Solaris, rely on the fallback definitions below, though use
[82] Fix | Delete
* Solaris-specific versions of bswap_{16,32,64}().
[83] Fix | Delete
*/
[84] Fix | Delete
[85] Fix | Delete
# include <sys/byteorder.h>
[86] Fix | Delete
[87] Fix | Delete
# define bswap_16(x) BSWAP_16(x)
[88] Fix | Delete
# define bswap_32(x) BSWAP_32(x)
[89] Fix | Delete
# define bswap_64(x) BSWAP_64(x)
[90] Fix | Delete
[91] Fix | Delete
#elif defined(__ANDROID__) || defined(__CYGWIN__) || \
[92] Fix | Delete
defined(__GNUC__) || defined(__GNU__)
[93] Fix | Delete
[94] Fix | Delete
# include <byteswap.h>
[95] Fix | Delete
# include <endian.h>
[96] Fix | Delete
[97] Fix | Delete
#else
[98] Fix | Delete
[99] Fix | Delete
#endif /* Specific platform support */
[100] Fix | Delete
[101] Fix | Delete
/*
[102] Fix | Delete
* Fallback definitions.
[103] Fix | Delete
*/
[104] Fix | Delete
[105] Fix | Delete
#include <inttypes.h>
[106] Fix | Delete
[107] Fix | Delete
#ifndef bswap_16
[108] Fix | Delete
# define bswap_16(x) \
[109] Fix | Delete
((uint16_t)((((uint16_t) (x) & 0xff00) >> 8) | \
[110] Fix | Delete
(((uint16_t) (x) & 0x00ff) << 8)))
[111] Fix | Delete
#endif /* !bswap_16 */
[112] Fix | Delete
[113] Fix | Delete
#ifndef bswap_32
[114] Fix | Delete
# define bswap_32(x) \
[115] Fix | Delete
((uint32_t)((((uint32_t) (x) & 0xff000000) >> 24) | \
[116] Fix | Delete
(((uint32_t) (x) & 0x00ff0000) >> 8) | \
[117] Fix | Delete
(((uint32_t) (x) & 0x0000ff00) << 8) | \
[118] Fix | Delete
(((uint32_t) (x) & 0x000000ff) << 24)))
[119] Fix | Delete
#endif /* !bswap_32 */
[120] Fix | Delete
[121] Fix | Delete
#ifndef bswap_64
[122] Fix | Delete
# define bswap_64(x) \
[123] Fix | Delete
((uint64_t)((((uint64_t) (x) & 0xff00000000000000ULL) >> 56) | \
[124] Fix | Delete
(((uint64_t) (x) & 0x00ff000000000000ULL) >> 40) | \
[125] Fix | Delete
(((uint64_t) (x) & 0x0000ff0000000000ULL) >> 24) | \
[126] Fix | Delete
(((uint64_t) (x) & 0x000000ff00000000ULL) >> 8) | \
[127] Fix | Delete
(((uint64_t) (x) & 0x00000000ff000000ULL) << 8) | \
[128] Fix | Delete
(((uint64_t) (x) & 0x0000000000ff0000ULL) << 24) | \
[129] Fix | Delete
(((uint64_t) (x) & 0x000000000000ff00ULL) << 40) | \
[130] Fix | Delete
(((uint64_t) (x) & 0x00000000000000ffULL) << 56)))
[131] Fix | Delete
#endif /* !bswap_64 */
[132] Fix | Delete
[133] Fix | Delete
#ifndef htobe16
[134] Fix | Delete
# if WORDS_BIGENDIAN
[135] Fix | Delete
[136] Fix | Delete
# define htobe16(x) (x)
[137] Fix | Delete
# define htole16(x) bswap_16(x)
[138] Fix | Delete
# define be16toh(x) (x)
[139] Fix | Delete
# define le16toh(x) bswap_16(x)
[140] Fix | Delete
[141] Fix | Delete
# else /* WORDS_BIGENDIAN */
[142] Fix | Delete
[143] Fix | Delete
# define htobe16(x) bswap_16(x)
[144] Fix | Delete
# define htole16(x) (x)
[145] Fix | Delete
# define be16toh(x) bswap_16(x)
[146] Fix | Delete
# define le16toh(x) (x)
[147] Fix | Delete
[148] Fix | Delete
# endif /* WORDS_BIGENDIAN */
[149] Fix | Delete
#endif /* !htobe16 */
[150] Fix | Delete
[151] Fix | Delete
#ifndef htobe32
[152] Fix | Delete
# if WORDS_BIGENDIAN
[153] Fix | Delete
[154] Fix | Delete
# define htobe32(x) (x)
[155] Fix | Delete
# define htole32(x) bswap_32(x)
[156] Fix | Delete
# define be32toh(x) (x)
[157] Fix | Delete
# define le32toh(x) bswap_32(x)
[158] Fix | Delete
[159] Fix | Delete
# else /* WORDS_BIGENDIAN */
[160] Fix | Delete
[161] Fix | Delete
# define htobe32(x) bswap_32(x)
[162] Fix | Delete
# define htole32(x) (x)
[163] Fix | Delete
# define be32toh(x) bswap_32(x)
[164] Fix | Delete
# define le32toh(x) (x)
[165] Fix | Delete
[166] Fix | Delete
# endif /* WORDS_BIGENDIAN */
[167] Fix | Delete
#endif /* !htobe32 */
[168] Fix | Delete
[169] Fix | Delete
#ifndef htobe64
[170] Fix | Delete
# if WORDS_BIGENDIAN
[171] Fix | Delete
[172] Fix | Delete
# define htobe64(x) (x)
[173] Fix | Delete
# define htole64(x) bswap_64(x)
[174] Fix | Delete
# define be64toh(x) (x)
[175] Fix | Delete
# define le64toh(x) bswap_64(x)
[176] Fix | Delete
[177] Fix | Delete
#else /* WORDS_BIGENDIAN */
[178] Fix | Delete
[179] Fix | Delete
# define htobe64(x) bswap_64(x)
[180] Fix | Delete
# define htole64(x) (x)
[181] Fix | Delete
# define be64toh(x) bswap_64(x)
[182] Fix | Delete
# define le64toh(x) (x)
[183] Fix | Delete
[184] Fix | Delete
# endif /* WORDS_BIGENDIAN */
[185] Fix | Delete
#endif /* !htobe64 */
[186] Fix | Delete
[187] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function