summaryrefslogtreecommitdiffstats
path: root/usr/include/endian.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:06:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:06:04 +0000
commit2f0649f6fe411d7e07c8d56cf8ea56db53536da8 (patch)
tree778611fb52176dce1ad06c68e87b2cb348ca0f7b /usr/include/endian.h
parentInitial commit. (diff)
downloadklibc-upstream/2.0.13.tar.xz
klibc-upstream/2.0.13.zip
Adding upstream version 2.0.13.upstream/2.0.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'usr/include/endian.h')
-rw-r--r--usr/include/endian.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/usr/include/endian.h b/usr/include/endian.h
new file mode 100644
index 0000000..61cda3a
--- /dev/null
+++ b/usr/include/endian.h
@@ -0,0 +1,21 @@
+/*
+ * endian.h
+ */
+
+#ifndef _ENDIAN_H
+#define _ENDIAN_H
+
+#include <klibc/endian.h>
+
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+#define BIG_ENDIAN __BIG_ENDIAN
+#define PDP_ENDIAN __PDP_ENDIAN
+#define BYTE_ORDER __BYTE_ORDER
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define __LONG_LONG_PAIR(HI, LO) LO, HI
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define __LONG_LONG_PAIR(HI, LO) HI, LO
+#endif
+
+#endif /* _ENDIAN_H */