diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 7a0ab23..74c6ed7 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -33,3 +33,4 @@ INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv USR_INCLUDES += -I $(INSTALL_LOCATION)/include -include $(TOP)/configure/CONFIG_SITE.local +-include $(TOP)/../CONFIG.local diff --git a/configure/RELEASE b/configure/RELEASE index 2fb63c1..3886fcd 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -24,3 +24,4 @@ EPICS_BASE=/home/install/epics/base # EPICS_BASE=/home/install/epics/base -include $(TOP)/configure/RELEASE.local +-include $(TOP)/../RELEASE.local diff --git a/pvDataApp/factory/PVDataCreateFactory.cpp b/pvDataApp/factory/PVDataCreateFactory.cpp index 053b529..90e0bda 100644 --- a/pvDataApp/factory/PVDataCreateFactory.cpp +++ b/pvDataApp/factory/PVDataCreateFactory.cpp @@ -23,6 +23,7 @@ using std::tr1::static_pointer_cast; using std::size_t; +using std::min; namespace epics { namespace pvData { @@ -69,11 +70,7 @@ template void BasePVScalar::serialize(ByteBuffer *pbuffer, SerializableControl *pflusher) const { pflusher->ensureBuffer(sizeof(T)); -#if defined (__GNUC__) &&__GNUC__ < 3 pbuffer->put(value); -#else - pbuffer->put(value); -#endif } template @@ -81,11 +78,7 @@ void BasePVScalar::deserialize(ByteBuffer *pbuffer, DeserializableControl *pflusher) { pflusher->ensureData(sizeof(T)); -#if defined (__GNUC__) &&__GNUC__ < 3 - value = pbuffer->get(pbuffer); -#else - value = pbuffer->get(); -#endif + value = pbuffer->GET(T); } typedef BasePVScalar BasePVBoolean; @@ -342,12 +335,12 @@ void DefaultPVArray::deserialize(ByteBuffer *pbuffer, size_t i = 0; while(true) { /* - size_t maxIndex = std::min(size-i, (int)(pbuffer->getRemaining()/sizeof(T)))+i; + size_t maxIndex = min(size-i, (int)(pbuffer->getRemaining()/sizeof(T)))+i; for(; iget(); */ - size_t maxCount = std::min(size-i, (pbuffer->getRemaining()/sizeof(T))); - pbuffer->getArray(get(), maxCount); + size_t maxCount = min(size-i, (pbuffer->getRemaining()/sizeof(T))); + pbuffer->getArray(get(), maxCount); i += maxCount; if(i::serialize(ByteBuffer *pbuffer, while(true) { /* - size_t maxIndex = std::min(end-i, (int)(pbuffer->getRemaining()/sizeof(T)))+i; + size_t maxIndex = min(end-i, (int)(pbuffer->getRemaining()/sizeof(T)))+i; for(; iput(value[i]); */ - size_t maxCount = std::min(end-i, (int)(pbuffer->getRemaining()/sizeof(T))); + size_t maxCount = min(end-i, (int)(pbuffer->getRemaining()/sizeof(T))); T * pvalue = const_cast(get()); - pbuffer->putArray(pvalue, maxCount); + pbuffer->putArray(pvalue, maxCount); i += maxCount; if(i() +#endif + /** * This class implements {@code Bytebuffer} that is like the {@code java.nio.ByteBuffer}. *

A {@code BitSet} is not safe for multithreaded use without @@ -322,7 +328,7 @@ public: * * @return The object. */ -#if defined (__GNUC__) && __GNUC__ < 3 +#if defined (__GNUC__) && (__GNUC__ < 3) template inline T get(const T*); #else @@ -494,102 +500,48 @@ public: * @param value The value. */ inline void putDouble (std::size_t index, double value) { put(index, value); } - -#if defined (__GNUC__) && __GNUC__ < 3 - /** * Get a boolean value from the byte buffer. * * @return The value. */ - inline bool getBoolean() { return get((int8*)0) != 0; } + inline bool getBoolean() { return GET( int8) != 0; } /** * Get a byte value from the byte buffer. * * @return The value. */ - inline int8 getByte () { return get((int8*)0); } + inline int8 getByte () { return GET( int8); } /** * Get a short value from the byte buffer. * * @return The value. */ - inline int16 getShort () { return get((int16*)0); } + inline int16 getShort () { return GET( int16); } /** * Get a int value from the byte buffer. * * @return The value. */ - inline int32 getInt () { return get((int32*)0); } + inline int32 getInt () { return GET( int32); } /** * Get a long value from the byte buffer. * * @return The value. */ - inline int64 getLong () { return get((int64*)0); } + inline int64 getLong () { return GET( int64); } /** * Get a float value from the byte buffer. * * @return The value. */ - inline float getFloat () { return get((float*)0); } + inline float getFloat () { return GET( float); } /** * Get a double value from the byte buffer. * * @return The value. */ - inline double getDouble () { return get((double*)0); } - - /** - * Get a boolean value from the byte buffer at the specified index. - * - * @param index The offset in the byte buffer. - * @return The value. - */ -#else - /** - * Get a boolean value from the byte buffer. - * - * @return The value. - */ - inline bool getBoolean() { return get< int8>() != 0; } - /** - * Get a byte value from the byte buffer. - * - * @return The value. - */ - inline int8 getByte () { return get< int8>(); } - /** - * Get a short value from the byte buffer. - * - * @return The value. - */ - inline int16 getShort () { return get< int16>(); } - /** - * Get a int value from the byte buffer. - * - * @return The value. - */ - inline int32 getInt () { return get< int32>(); } - /** - * Get a long value from the byte buffer. - * - * @return The value. - */ - inline int64 getLong () { return get< int64>(); } - /** - * Get a float value from the byte buffer. - * - * @return The value. - */ - inline float getFloat () { return get< float>(); } - /** - * Get a double value from the byte buffer. - * - * @return The value. - */ - inline double getDouble () { return get(); } -#endif + inline double getDouble () { return GET(double); } /** * Get a boolean value from the byte buffer at the specified index. * @@ -765,7 +717,7 @@ private: } -#if defined (__GNUC__) && __GNUC__ < 3 +#if defined (__GNUC__) && (__GNUC__ < 3) template inline T ByteBuffer::get(const T*) #else diff --git a/pvDataApp/misc/queue.h b/pvDataApp/misc/queue.h index 69792ed..d496594 100644 --- a/pvDataApp/misc/queue.h +++ b/pvDataApp/misc/queue.h @@ -8,7 +8,6 @@ * @author mrk */ #include -#include #include #include #include diff --git a/pvDataApp/misc/status.cpp b/pvDataApp/misc/status.cpp index e28f607..789b03b 100644 --- a/pvDataApp/misc/status.cpp +++ b/pvDataApp/misc/status.cpp @@ -16,7 +16,7 @@ namespace epics { namespace pvData { const char* Status::StatusTypeName[] = { "OK", "WARNING", "ERROR", "FATAL" }; epics::pvData::String Status::m_emptyString; -Status Status::OK; +Status Status::Ok; //PVDATA_REFCOUNT_MONITOR_DEFINE(status); diff --git a/pvDataApp/misc/status.h b/pvDataApp/misc/status.h index 40b4418..61e2bed 100644 --- a/pvDataApp/misc/status.h +++ b/pvDataApp/misc/status.h @@ -39,7 +39,7 @@ namespace epics { namespace pvData { static const char* StatusTypeName[]; - static Status OK; + static Status Ok; /** * Creates OK status; STATUSTYPE_OK, empty message and stackDump. diff --git a/pvDataApp/pv/pvData.h b/pvDataApp/pv/pvData.h index af71664..507f2df 100644 --- a/pvDataApp/pv/pvData.h +++ b/pvDataApp/pv/pvData.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/testApp/pv/testPVScalarArray.cpp b/testApp/pv/testPVScalarArray.cpp index 85714df..c787269 100644 --- a/testApp/pv/testPVScalarArray.cpp +++ b/testApp/pv/testPVScalarArray.cpp @@ -128,7 +128,7 @@ static void longArray() PVLongArrayPtr pvLongArray = static_pointer_cast(pvScalarArray); LongArray value; value.reserve(length); - int64 xxx = 0x7fffffffffffffffL; + int64 xxx = 0x7fffffffffffffffLL; for(size_t i = 0; iput(0,length,value,0); builder.clear(); @@ -169,7 +169,7 @@ static void ulongArray() PVULongArrayPtr pvULongArray = static_pointer_cast(pvScalarArray); ULongArray value; value.reserve(length); - uint64 xxx = 0x7fffffffffffffffL; + uint64 xxx = 0x7fffffffffffffffLL; for(size_t i = 0; iput(0,length,value,0); builder.clear();