diff options
author | Jo-Philipp Wich <jo@mein.io> | 2023-07-14 10:54:38 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2023-08-09 01:03:21 +0200 |
commit | be071072115059726846163c6f28f62dc01573ec (patch) | |
tree | 1bbf6fe1140e6305c86b621d580b9999706e82b2 /include/endian.h | |
parent | a38315454add264a41094524e1fcf435acb85fe8 (diff) |
treewide: consolidate platform specific code in platform.c
Get rid of most __APPLE__ guards by introducing a central platform.c unit
providing drop-in replacements for missing APIs.
Also move system signal definitions into the new platform file to be able
to share them with the upcoming debug library.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include/endian.h')
-rw-r--r-- | include/endian.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/include/endian.h b/include/endian.h deleted file mode 100644 index 198cf7c..0000000 --- a/include/endian.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifdef __APPLE__ - -# include <machine/endian.h> -# 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) -# define le32toh(x) OSSwapLittleToHostInt32(x) - -# define htobe64(x) OSSwapHostToBigInt64(x) -# define htole64(x) OSSwapHostToLittleInt64(x) -# define be64toh(x) OSSwapBigToHostInt64(x) -# define le64toh(x) OSSwapLittleToHostInt64(x) - -#else -# include_next <endian.h> -#endif |