|
|
@ -21,13 +21,20 @@ |
|
|
|
#else |
|
|
|
#else |
|
|
|
#define PLATFORM_IS_LITTLE_ENDIAN false |
|
|
|
#define PLATFORM_IS_LITTLE_ENDIAN false |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) ||\ |
|
|
|
#elif defined(OS_FREEBSD) |
|
|
|
|
|
|
|
#include <sys/types.h> |
|
|
|
|
|
|
|
#include <sys/endian.h> |
|
|
|
|
|
|
|
#define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN) |
|
|
|
|
|
|
|
#elif defined(OS_OPENBSD) || defined(OS_NETBSD) ||\ |
|
|
|
defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) |
|
|
|
defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) |
|
|
|
#include <sys/types.h> |
|
|
|
#include <sys/types.h> |
|
|
|
#include <sys/endian.h> |
|
|
|
#include <sys/endian.h> |
|
|
|
|
|
|
|
#elif defined(OS_HPUX) |
|
|
|
|
|
|
|
#define PLATFORM_IS_LITTLE_ENDIAN false |
|
|
|
#else |
|
|
|
#else |
|
|
|
#include <endian.h> |
|
|
|
#include <endian.h> |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#include <pthread.h> |
|
|
|
#include <pthread.h> |
|
|
|
#ifdef SNAPPY |
|
|
|
#ifdef SNAPPY |
|
|
|
#include <snappy.h> |
|
|
|
#include <snappy.h> |
|
|
@ -42,7 +49,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\ |
|
|
|
#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\ |
|
|
|
defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\ |
|
|
|
defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\ |
|
|
|
defined(OS_ANDROID) |
|
|
|
defined(OS_ANDROID) || defined(OS_HPUX) |
|
|
|
// Use fread/fwrite/fflush on platforms without _unlocked variants
|
|
|
|
// Use fread/fwrite/fflush on platforms without _unlocked variants
|
|
|
|
#define fread_unlocked fread |
|
|
|
#define fread_unlocked fread |
|
|
|
#define fwrite_unlocked fwrite |
|
|
|
#define fwrite_unlocked fwrite |
|
|
|