dtinfo: use autotools endian detection instead of cpu-specific checks
This affects the definitions of OLIAS_BIG_ENDIAN and OLIAS_LITTLE_ENDIAN when building mmdb.
This commit is contained in:
@@ -4,28 +4,6 @@ noinst_LTLIBRARIES = libutility.la
|
|||||||
|
|
||||||
libutility_la_CXXFLAGS = -DC_API -DPORTABLE_DB -I.. -I../dti_excs -I../misc
|
libutility_la_CXXFLAGS = -DC_API -DPORTABLE_DB -I.. -I../dti_excs -I../misc
|
||||||
|
|
||||||
|
|
||||||
#FIXME: This should be done in autotools_config.h
|
|
||||||
if I386
|
|
||||||
libutility_la_CXXFLAGS += -DMMDB_LITTLE_ENDIAN
|
|
||||||
endif
|
|
||||||
|
|
||||||
if X86_64
|
|
||||||
libutility_la_CXXFLAGS += -DMMDB_LITTLE_ENDIAN
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ARM
|
|
||||||
libutility_la_CXXFLAGS += -DMMDB_LITTLE_ENDIAN
|
|
||||||
endif
|
|
||||||
|
|
||||||
if PPC
|
|
||||||
libutility_la_CXXFLAGS += -DMMDB_BIG_ENDIAN
|
|
||||||
endif
|
|
||||||
|
|
||||||
if SPARC
|
|
||||||
libutility_la_CXXFLAGS += -DMMDB_BIG_ENDIAN
|
|
||||||
endif
|
|
||||||
|
|
||||||
libutility_la_SOURCES = funcs.C ostring.C pm_random.C \
|
libutility_la_SOURCES = funcs.C ostring.C pm_random.C \
|
||||||
atoi_pearson.C xtime.C buffer.C \
|
atoi_pearson.C xtime.C buffer.C \
|
||||||
atoi_larson.C atomic_lock.C rw_lock.C \
|
atoi_larson.C atomic_lock.C rw_lock.C \
|
||||||
|
|||||||
@@ -25,6 +25,16 @@
|
|||||||
#ifndef _config_h
|
#ifndef _config_h
|
||||||
#define _config_h 1
|
#define _config_h 1
|
||||||
|
|
||||||
|
#include <autotools_config.h> // determine endianess
|
||||||
|
|
||||||
|
#if defined(WORDS_BIGENDIAN)
|
||||||
|
# define OLIAS_BIG_ENDIAN
|
||||||
|
# undef OLIAS_LITTLE_ENDIAN
|
||||||
|
#else
|
||||||
|
# define OLIAS_LITTLE_ENDIAN
|
||||||
|
# undef OLIAS_BIG_ENDIAN
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef OLIAS_LITTLE_ENDIAN
|
#ifdef OLIAS_LITTLE_ENDIAN
|
||||||
# define MMDB_LITTLE_ENDIAN // i386
|
# define MMDB_LITTLE_ENDIAN // i386
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user