]> git.draconx.ca Git - liblbx.git/blobdiff - src/byteorder.h
liblbx: Kill byteorder.h.
[liblbx.git] / src / byteorder.h
diff --git a/src/byteorder.h b/src/byteorder.h
deleted file mode 100644 (file)
index 4cf2854..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef BYTEORDER_H_
-#define BYTEORDER_H_
-
-#ifdef HAVE_CONFIG_H
-#      include "config.h"
-#endif
-
-#include <stdint.h>
-
-static inline uint16_t _flip16(uint16_t val)
-{
-       uint16_t hostval;
-       int i;
-
-       for (i = 0; i < sizeof val; i++)
-               ((uint8_t *)&hostval)[i] = ((uint8_t *)&val)[sizeof val - i];
-}
-
-static inline uint32_t _flip32(uint32_t val)
-{
-       uint32_t hostval;
-       int i;
-
-       for (i = 0; i < sizeof val; i++)
-               ((uint8_t *)&hostval)[i] = ((uint8_t *)&val)[sizeof val - i];
-}
-
-#ifdef WORDS_BIGENDIAN
-#      define letohs(x) _flip16(x)
-#      define letohl(x) _flip32(x)
-#else
-#      define letohs(x) ((uint16_t)(x))
-#      define letohl(x) ((uint16_t)(x))
-#endif
-
-#endif