Skip to content

Commit

Permalink
tl-parser: remove 16-bit endianness functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Dec 23, 2021
1 parent ff6615e commit c073f3d
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions td/generate/tl-parser/portable_endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@

# include <libkern/OSByteOrder.h>

# define htobe16(x) OSSwapHostToBigInt16(x)
# define htole16(x) OSSwapHostToLittleInt16(x)
# define be16toh(x) OSSwapBigToHostInt16(x)
# define le16toh(x) OSSwapLittleToHostInt16(x)

# define htobe32(x) OSSwapHostToBigInt32(x)
# define htole32(x) OSSwapHostToLittleInt32(x)
# define be32toh(x) OSSwapBigToHostInt32(x)
Expand All @@ -53,9 +48,6 @@

# include <sys/endian.h>

# define be16toh(x) betoh16(x)
# define le16toh(x) letoh16(x)

# define be32toh(x) betoh32(x)
# define le32toh(x) letoh32(x)

Expand All @@ -71,11 +63,6 @@

# if BYTE_ORDER == LITTLE_ENDIAN

# define htobe16(x) htons(x)
# define htole16(x) (x)
# define be16toh(x) ntohs(x)
# define le16toh(x) (x)

# define htobe32(x) htonl(x)
# define htole32(x) (x)
# define be32toh(x) ntohl(x)
Expand All @@ -89,11 +76,6 @@
# elif BYTE_ORDER == BIG_ENDIAN

/* that would be xbox 360 */
# define htobe16(x) (x)
# define htole16(x) __builtin_bswap16(x)
# define be16toh(x) (x)
# define le16toh(x) __builtin_bswap16(x)

# define htobe32(x) (x)
# define htole32(x) __builtin_bswap32(x)
# define be32toh(x) (x)
Expand Down

0 comments on commit c073f3d

Please sign in to comment.