add windows endian compatibility

This commit is contained in:
qiukeren 2015-12-22 01:45:50 +08:00
parent 3beb9cb761
commit 5a75658a13
1 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "config.h"
#if HAVE_ENDIAN_H
#if defined(__MACH__) && defined(__APPLE__)
#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>