Add some endianness macro aliases for OpenBSD.
This commit is contained in:
parent
11794763b1
commit
0db66925e1
1 changed files with 10 additions and 0 deletions
|
@ -41,6 +41,16 @@
|
||||||
* dealt with).
|
* dealt with).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(le32toh) && defined(letoh32)
|
||||||
|
# define le32toh(x) letoh32(x)
|
||||||
|
# define be32toh(x) betoh32(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(le16toh) && defined(letoh16)
|
||||||
|
# define le16toh(x) letoh16(x)
|
||||||
|
# define be16toh(x) betoh16(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(le32toh) && defined(bswap_32)
|
#if !defined(le32toh) && defined(bswap_32)
|
||||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||||
# define be32toh(x) bswap_32(x)
|
# define be32toh(x) bswap_32(x)
|
||||||
|
|
Loading…
Add table
Reference in a new issue