diff --git a/src/MultiPlayer/Makefile.am b/src/MultiPlayer/Makefile.am index 9057a991c..0ad23d80a 100644 --- a/src/MultiPlayer/Makefile.am +++ b/src/MultiPlayer/Makefile.am @@ -1,3 +1,7 @@ +noinst_PROGRAMS = swap_test + +swap_test_SOURCES = swap_test.cpp + noinst_LIBRARIES = libMultiPlayer.a libMultiPlayer_a_SOURCES = multiplayrxmgr.cxx multiplayrxmgr.hxx multiplaytxmgr.cxx multiplaytxmgr.hxx mpplayer.cxx mpplayer.hxx mpmessages.hxx tiny_xdr.cpp tiny_xdr.hpp diff --git a/src/MultiPlayer/swap_test.cpp b/src/MultiPlayer/swap_test.cpp new file mode 100644 index 000000000..5f91521c2 --- /dev/null +++ b/src/MultiPlayer/swap_test.cpp @@ -0,0 +1,15 @@ + +#include +#include +#include "tiny_xdr.hpp" + +int main() +{ + uint32_t ui32 = 0xFFAACCEE; + uint64_t ui64 = 0x00BBAADDFFAACCEELL; + + printf("UI32: (normal) %x\nUI32: (swapped) %x\n\n", ui32, bswap_32(ui32) ); + printf("UI64: (normal) %llx\nUI64: (swapped) %llx\n\n", ui64, bswap_64(ui64) ); + + return 0; +}