mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-29 13:03:36 +01:00
std: move endian.h to fxlibc
This commit is contained in:
parent
edcebff311
commit
20b7238057
1 changed files with 2 additions and 28 deletions
|
@ -1,28 +1,2 @@
|
||||||
//---
|
/* Now provided by fxlibc. */
|
||||||
// gint:std:endian - Endianness conversion
|
#include <endian.h>
|
||||||
//---
|
|
||||||
|
|
||||||
#ifndef GINT_STD_ENDIAN
|
|
||||||
#define GINT_STD_ENDIAN
|
|
||||||
|
|
||||||
#include <gint/defs/types.h>
|
|
||||||
#include <gint/defs/attributes.h>
|
|
||||||
|
|
||||||
/* CASIO calculators are configured as big-endian. */
|
|
||||||
|
|
||||||
#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)
|
|
||||||
#define le32toh(x) (__builtin_bswap32(x))
|
|
||||||
|
|
||||||
#define htobe64(x) (x)
|
|
||||||
#define htole64(x) (__builtin_bswap64(x))
|
|
||||||
#define be64toh(x) (x)
|
|
||||||
#define le64toh(x) (__builtin_bswap64(x))
|
|
||||||
|
|
||||||
#endif /* GINT_STD_ENDIAN */
|
|
||||||
|
|
Loading…
Reference in a new issue