35 lines
809 B
Text
35 lines
809 B
Text
Index: lib/internal.h
|
|
--- lib/internal.h.orig
|
|
+++ lib/internal.h
|
|
@@ -105,30 +105,7 @@ uint8_t* unshield_header_get_buffer(Header* header, ui
|
|
#define FSIZE(file) ((file) ? unshield_fsize(file) : 0)
|
|
#define STREQ(s1,s2) (0 == strcmp(s1,s2))
|
|
|
|
-#if WORDS_BIGENDIAN
|
|
-
|
|
-#if HAVE_BYTESWAP_H
|
|
-#include <byteswap.h>
|
|
-#elif HAVE_SYS_BYTESWAP_H
|
|
-#include <sys/byteswap.h>
|
|
-#else
|
|
-
|
|
-/* use our own functions */
|
|
-#define IMPLEMENT_BSWAP_XX 1
|
|
-#define bswap_16 unshield_bswap_16
|
|
-#define bswap_32 unshield_bswap_32
|
|
-
|
|
-uint16_t bswap_16(uint16_t x);
|
|
-uint32_t bswap_32(uint32_t x);
|
|
-#endif
|
|
-
|
|
-#define letoh16(x) bswap_16(x)
|
|
-#define letoh32(x) bswap_32(x)
|
|
-
|
|
-#else
|
|
-#define letoh32(x) (x)
|
|
-#define letoh16(x) (x)
|
|
-#endif
|
|
+#include <endian.h>
|
|
|
|
static inline uint16_t get_unaligned_le16(const uint8_t *p)
|
|
{
|