mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
utils: add endian_inl.h
moves the following to this header: - htole*() definitions from bit_writer.c - __BIG_ENDIAN__ fallback define from bit_reader_inl.h Change-Id: I7fff59543f08a70bf8f9ddac849b72ed290471b1
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#define WEBP_UTILS_BIT_READER_INL_H_
|
||||
|
||||
#include "./bit_reader.h"
|
||||
#include "./endian_inl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -35,12 +36,6 @@ typedef uint16_t lbit_t;
|
||||
typedef uint8_t lbit_t;
|
||||
#endif
|
||||
|
||||
// some endian fix (e.g.: mips-gcc doesn't define __BIG_ENDIAN__)
|
||||
#if !defined(__BIG_ENDIAN__) && defined(__BYTE_ORDER__) && \
|
||||
(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define __BIG_ENDIAN__
|
||||
#endif
|
||||
|
||||
// gcc 4.3 has builtin functions for swap32/swap64
|
||||
#if defined(__GNUC__) && \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
|
Reference in New Issue
Block a user