Fix behavior change about endianness check in maxmind/libmaxminddb#123 (#770)

This commit is contained in:
Vincent Herbet
2019-10-20 23:21:57 +02:00
committed by Arkshine
parent dafabc73c0
commit 78ecb35e3c
3 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,13 @@
#ifndef MAXMINDDB_CONFIG_H
#define MAXMINDDB_CONFIG_H
#include <osdefs.h> // BYTE_ORDER, LITTLE_ENDIAN
/* This fixes a behavior change in after https://github.com/maxmind/libmaxminddb/pull/123. */
#if defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN
#define MMDB_LITTLE_ENDIAN 1
#endif
#ifndef MMDB_UINT128_USING_MODE
/* Define as 1 if we we use unsigned int __atribute__ ((__mode__(TI))) for uint128 values */
#define MMDB_UINT128_USING_MODE 0