![](/Images/img4.jpg)
Go to the documentation of this file.
9 #ifndef SQUID_LIB_NTLMAUTH_SUPPORT_ENDIAN_H
10 #define SQUID_LIB_NTLMAUTH_SUPPORT_ENDIAN_H
15 #if HAVE_MACHINE_BYTE_SWAP_H
16 #include <machine/byte_swap.h>
19 #include <sys/bswap.h>
25 #include <sys/endian.h>
46 #if !HAVE_HTOLE16 && !defined(htole16)
48 #if !HAVE_BSWAP16 && !defined(bswap16)
49 # if HAVE_BSWAP_16 || defined(bswap_16)
50 # define bswap16(x) bswap_16(x)
53 (((((uint16_t)(x)) >> 8) & 0xff) | ((((uint16_t)(x)) & 0xff) << 8))
58 # if defined(WORDS_BIGENDIAN)
59 # define htole16(x) bswap16(x)
61 # define htole16(x) (x)
65 #if !HAVE_HTOLE32 && !defined(htole32)
66 #if ! HAVE_BSWAP32 && ! defined(bswap32)
68 # if HAVE_BSWAP_32 || defined(bswap_32)
69 # define bswap32(x) bswap_32(x)
72 (((((uint32_t)(x)) & 0xff000000) >> 24) | \
73 ((((uint32_t)(x)) & 0x00ff0000) >> 8) | \
74 ((((uint32_t)(x)) & 0x0000ff00) << 8) | \
75 ((((uint32_t)(x)) & 0x000000ff) << 24))
80 # if defined(WORDS_BIGENDIAN)
81 # define htole32(x) bswap32(x)
83 # define htole32(x) (x)
88 #if !HAVE_LE16TOH && !defined(le16toh)
89 #define le16toh(x) htole16(x)
91 #if !HAVE_LE32TOH && !defined(le32toh)
92 #define le32toh(x) htole32(x)
Introduction
Documentation
Support
Miscellaneous