From 9c56b0604e697356e85d72b5efcadec04383597a Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Thu, 15 Sep 2011 20:11:13 +0200 Subject: [PATCH] added byteorder util --- testApp/misc/Makefile | 4 ++++ testApp/misc/testByteOrder.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 testApp/misc/testByteOrder.cpp diff --git a/testApp/misc/Makefile b/testApp/misc/Makefile index 50f1509..43003e6 100644 --- a/testApp/misc/Makefile +++ b/testApp/misc/Makefile @@ -30,6 +30,10 @@ PROD_HOST += testBitSet testBitSet_SRCS += testBitSet.cpp testBitSet_LIBS += pvData Com +PROD_HOST += testByteOrder +testByteOrder_SRCS += testByteOrder.cpp +testByteOrder_LIBS += Com + PROD_HOST += testByteBuffer testByteBuffer_SRCS += testByteBuffer.cpp testByteBuffer_LIBS += pvData Com diff --git a/testApp/misc/testByteOrder.cpp b/testApp/misc/testByteOrder.cpp new file mode 100644 index 0000000..123bfc3 --- /dev/null +++ b/testApp/misc/testByteOrder.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main() +{ +printf("EPICS_BYTE_ORDER: %s\n", (EPICS_BYTE_ORDER == EPICS_ENDIAN_LITTLE) ? "little" : "big"); +printf("EPICS_FLOAT_WORD_ORDER: %s\n", (EPICS_FLOAT_WORD_ORDER == EPICS_ENDIAN_LITTLE) ? "little" : "big"); +return 0; +} +