From 8ebadb261c2dc039f72da868f7d68e548165bfb7 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 5 Sep 2013 10:32:11 -0500 Subject: [PATCH] Fix VxWorks and RTEMS builds --- configure/CONFIG_SITE | 1 - pvAccessApp/Makefile | 2 +- pvAccessApp/ca/caChannel.cpp | 4 ++-- pvAccessApp/ca/caChannel.h | 2 +- pvAccessApp/server/serverContext.cpp | 2 +- testApp/utils/Makefile | 6 +++--- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 534d470..575e348 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -43,7 +43,6 @@ endif INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv USR_INCLUDES += -I $(INSTALL_LOCATION)/include -USR_CXXFLAGS += -Wall -Wextra #USR_CPPFLAGS += -DPV_MB -g -ggdb diff --git a/pvAccessApp/Makefile b/pvAccessApp/Makefile index a9cd00b..b0e7faa 100644 --- a/pvAccessApp/Makefile +++ b/pvAccessApp/Makefile @@ -2,7 +2,7 @@ TOP = .. include $(TOP)/configure/CONFIG PVACCESS = $(TOP)/pvAccessApp/ - +USR_CXXFLAGS_RTEMS = -D__rtems__ SRC_DIRS += $(PVACCESS)/pva INC += pvaConstants.h diff --git a/pvAccessApp/ca/caChannel.cpp b/pvAccessApp/ca/caChannel.cpp index 890b164..60b10ce 100644 --- a/pvAccessApp/ca/caChannel.cpp +++ b/pvAccessApp/ca/caChannel.cpp @@ -561,7 +561,7 @@ void copy_DBR(const void * dbr, unsigned count, PVStructure::shared_pointer cons } } -#ifdef vxWorks +#if defined(__vxworks) || defined(__rtems__) // dbr_long_t is defined as "int", pvData uses int32 which can be defined as "long int" (32-bit) // template template<> @@ -1087,7 +1087,7 @@ static doPut doPutFuncTable[] = doPut_pvStructure, // DBR_FLOAT doPut_pvStructure, // DBR_ENUM doPut_pvStructure, // DBR_CHAR - #ifdef vxWorks + #if defined(__vxworks) || defined(__rtems__) doPut_pvStructure, // DBR_LONG #else doPut_pvStructure, // DBR_LONG diff --git a/pvAccessApp/ca/caChannel.h b/pvAccessApp/ca/caChannel.h index dccefeb..74a4d2f 100644 --- a/pvAccessApp/ca/caChannel.h +++ b/pvAccessApp/ca/caChannel.h @@ -24,7 +24,7 @@ class CAChannel : public: POINTER_DEFINITIONS(CAChannel); - static CAChannel::shared_pointer create(ChannelProvider::shared_pointer const & channelProvider, + static shared_pointer create(ChannelProvider::shared_pointer const & channelProvider, epics::pvData::String const & channelName, short priority, ChannelRequester::shared_pointer const & channelRequester); diff --git a/pvAccessApp/server/serverContext.cpp b/pvAccessApp/server/serverContext.cpp index ce63242..7a733db 100644 --- a/pvAccessApp/server/serverContext.cpp +++ b/pvAccessApp/server/serverContext.cpp @@ -148,7 +148,7 @@ void ServerContextImpl::initialize(ChannelAccess::shared_pointer const & channel // user all providers if (_channelProviderNames == PVACCESS_ALL_PROVIDERS) { - _channelProviderNames.clear(); + _channelProviderNames.resize(0); // VxWorks 5.5 omits clear() std::auto_ptr names = _channelAccess->getProviderNames(); for (ChannelAccess::stringVector_t::iterator iter = names->begin(); iter != names->end(); iter++) diff --git a/testApp/utils/Makefile b/testApp/utils/Makefile index a9624b2..9b68a40 100644 --- a/testApp/utils/Makefile +++ b/testApp/utils/Makefile @@ -4,15 +4,15 @@ include $(TOP)/configure/CONFIG PROD_LIBS += pvAccess pvData pvMB Com -TESTPROD += testAtomicBoolean +TESTPROD_HOST += testAtomicBoolean testAtomicBoolean_SRCS = testAtomicBoolean.cpp TESTS += testAtomicBoolean -TESTPROD += testHexDump +TESTPROD_HOST += testHexDump testHexDump = testHexDump.cpp TESTS += testHexDump -TESTPROD += testInetAddressUtils +TESTPROD_HOST += testInetAddressUtils testInetAddressUtils = testInetAddressUtils.cpp # Avoid errors from inlined htonl() etc. used as template argument testInetAddressUtils_CXXFLAGS = -O0