Uses built-in byte swap if available (Apple) and if bswap_XX is undefined.

Defers to pre-defined version if found (e.g. protobuf). For protobuf case, the definitions are identical and thus include order should not affect results.

Github-Pull: #9366
Rebased-From: 815f4148b2eff6c64c764e910e79677d5a67adc7
This commit is contained in:
Karl-Johan Alm
2016-12-16 16:52:35 +09:00
committed by Wladimir J. van der Laan
parent 77eaadb6c9
commit 59c37ae55a
7 changed files with 97 additions and 1 deletions

View File

@@ -5,13 +5,16 @@
bin_PROGRAMS += qt/test/test_bitcoin-qt
TESTS += qt/test/test_bitcoin-qt
TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp
TEST_QT_MOC_CPP = \
qt/test/moc_compattests.cpp \
qt/test/moc_uritests.cpp
if ENABLE_WALLET
TEST_QT_MOC_CPP += qt/test/moc_paymentservertests.cpp
endif
TEST_QT_H = \
qt/test/compattests.h \
qt/test/uritests.h \
qt/test/paymentrequestdata.h \
qt/test/paymentservertests.h
@@ -20,6 +23,7 @@ qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
qt_test_test_bitcoin_qt_SOURCES = \
qt/test/compattests.cpp \
qt/test/test_main.cpp \
qt/test/uritests.cpp \
$(TEST_QT_H)