Add macos/freebsd missing endian.h include and add win endianness info
This commit is contained in:
parent
e25f655005
commit
3cd994c9fb
@ -29,7 +29,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "config.h"
|
||||
#if HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#ifdef _WIN32
|
||||
#define __BYTE_ORDER 0
|
||||
#define __LITTLE_ENDIAN 0
|
||||
#define __BIG_ENDIAN 1
|
||||
#elif defined(__MACH__) && defined(__APPLE__)
|
||||
#include <machine/endian.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/endian.h>
|
||||
#else
|
||||
#include <endian.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <string.h> // for memcpy
|
||||
#include <iostream>
|
||||
|
Loading…
x
Reference in New Issue
Block a user