Fix VxWorks and RTEMS builds

This commit is contained in:
Andrew Johnson
2013-09-05 10:32:11 -05:00
parent b90d8f5151
commit 8ebadb261c
6 changed files with 8 additions and 9 deletions

View File

@ -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

View File

@ -2,7 +2,7 @@ TOP = ..
include $(TOP)/configure/CONFIG
PVACCESS = $(TOP)/pvAccessApp/
USR_CXXFLAGS_RTEMS = -D__rtems__
SRC_DIRS += $(PVACCESS)/pva
INC += pvaConstants.h

View File

@ -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<primitive type, ScalarType, scalar Field, array Field>
template<>
@ -1087,7 +1087,7 @@ static doPut doPutFuncTable[] =
doPut_pvStructure<dbr_float_t, pvFloat, PVFloat, PVFloatArray>, // DBR_FLOAT
doPut_pvStructure<dbr_enum_t, pvString, PVString, PVStringArray>, // DBR_ENUM
doPut_pvStructure<int8 /*dbr_char_t*/, pvByte, PVByte, PVByteArray>, // DBR_CHAR
#ifdef vxWorks
#if defined(__vxworks) || defined(__rtems__)
doPut_pvStructure<int32, pvInt, PVInt, PVIntArray>, // DBR_LONG
#else
doPut_pvStructure<dbr_long_t, pvInt, PVInt, PVIntArray>, // DBR_LONG

View File

@ -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);

View File

@ -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<ChannelAccess::stringVector_t> names = _channelAccess->getProviderNames();
for (ChannelAccess::stringVector_t::iterator iter = names->begin(); iter != names->end(); iter++)

View File

@ -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