diff --git a/pvtoolsSrc/eget.cpp b/pvtoolsSrc/eget.cpp index 85bd8c4..00508c6 100644 --- a/pvtoolsSrc/eget.cpp +++ b/pvtoolsSrc/eget.cpp @@ -1,4 +1,4 @@ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif @@ -45,7 +45,7 @@ bool transpose = false; bool dumpStructure = false; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_MINGW) FILE *popen(const char *command, const char *mode) { return _popen(command, mode); } diff --git a/pvtoolsSrc/pvlist.cpp b/pvtoolsSrc/pvlist.cpp index 89064db..88258b9 100644 --- a/pvtoolsSrc/pvlist.cpp +++ b/pvtoolsSrc/pvlist.cpp @@ -25,7 +25,7 @@ #include #include -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_MINGW) FILE *popen(const char *command, const char *mode) { return _popen(command, mode); } diff --git a/src/Makefile b/src/Makefile index 7a304f4..57c162b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -36,6 +36,9 @@ LIBRARY = pvAccess SHRLIB_VERSION = $(EPICS_PVA_MAJOR_VERSION).$(EPICS_PVA_MINOR_VERSION).$(EPICS_PVA_MAINTENANCE_VERSION) pvAccess_LIBS += pvData +ifdef WITH_MICROBENCH + pvAccess_LIBS += pvMB +endif pvAccess_LIBS += ca pvAccess_LIBS += Com diff --git a/src/ca/caChannel.cpp b/src/ca/caChannel.cpp index 2d6a492..9ea13fa 100644 --- a/src/ca/caChannel.cpp +++ b/src/ca/caChannel.cpp @@ -6,9 +6,10 @@ #include -#include #include +#define epicsExportSharedSymbols +#include #include #include diff --git a/src/ca/caProvider.cpp b/src/ca/caProvider.cpp index a515e04..0ec6d3c 100644 --- a/src/ca/caProvider.cpp +++ b/src/ca/caProvider.cpp @@ -10,10 +10,8 @@ #include #include -#include - #define epicsExportSharedSymbols - +#include #include #include diff --git a/src/client/pv/pvAccess.h b/src/client/pv/pvAccess.h index 7ff9831..937c54a 100644 --- a/src/client/pv/pvAccess.h +++ b/src/client/pv/pvAccess.h @@ -990,9 +990,9 @@ public: virtual std::auto_ptr getProviderNames() = 0; }; -epicsShareExtern ChannelProviderRegistry::shared_pointer getChannelProviderRegistry(); -epicsShareExtern void registerChannelProviderFactory(ChannelProviderFactory::shared_pointer const & channelProviderFactory); -epicsShareExtern void unregisterChannelProviderFactory(ChannelProviderFactory::shared_pointer const & channelProviderFactory); +epicsShareFunc ChannelProviderRegistry::shared_pointer getChannelProviderRegistry(); +epicsShareFunc void registerChannelProviderFactory(ChannelProviderFactory::shared_pointer const & channelProviderFactory); +epicsShareFunc void unregisterChannelProviderFactory(ChannelProviderFactory::shared_pointer const & channelProviderFactory); /** diff --git a/src/mb/pv/pvAccessMB.h b/src/mb/pv/pvAccessMB.h index 9bc5a1a..6a09bac 100644 --- a/src/mb/pv/pvAccessMB.h +++ b/src/mb/pv/pvAccessMB.h @@ -1,11 +1,12 @@ +/** + * Copyright - See the COPYRIGHT that is included with this distribution. + * pvAccessCPP is distributed subject to a Software License Agreement found + * in file LICENSE that is included with this distribution. + */ + #ifndef _PVACCESSMB_H_ #define _PVACCESSMB_H_ -#ifdef epicsExportSharedSymbols -# define pvAccessMBEpicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #ifdef WITH_MICROBENCH #include @@ -38,12 +39,6 @@ #endif - -#ifdef pvAccessMBEpicsExportSharedSymbols -# define epicsExportSharedSymbols -# undef pvAccessMBEpicsExportSharedSymbols -#endif - MB_DECLARE_EXTERN(channelGet); #endif diff --git a/src/mb/pvAccessMB.cpp b/src/mb/pvAccessMB.cpp index fb33716..cb4286d 100644 --- a/src/mb/pvAccessMB.cpp +++ b/src/mb/pvAccessMB.cpp @@ -1,3 +1,15 @@ +/** + * Copyright - See the COPYRIGHT that is included with this distribution. + * pvAccessCPP is distributed subject to a Software License Agreement found + * in file LICENSE that is included with this distribution. + */ + +#ifdef WITH_MICROBENCH +#include +#endif + +#define epicsExportSharedSymbols + #include "pv/pvAccessMB.h" MB_DECLARE(channelGet, 100000); diff --git a/src/pipelineService/pv/pipelineServer.h b/src/pipelineService/pv/pipelineServer.h index 4a50beb..968e9f0 100644 --- a/src/pipelineService/pv/pipelineServer.h +++ b/src/pipelineService/pv/pipelineServer.h @@ -65,7 +65,7 @@ public: }; -epicsShareExtern Channel::shared_pointer createPipelineChannel(ChannelProvider::shared_pointer const & provider, +epicsShareFunc Channel::shared_pointer createPipelineChannel(ChannelProvider::shared_pointer const & provider, std::string const & channelName, ChannelRequester::shared_pointer const & channelRequester, PipelineService::shared_pointer const & pipelineService); diff --git a/src/pva/clientFactory.cpp b/src/pva/clientFactory.cpp index 2e8cec8..9075e70 100644 --- a/src/pva/clientFactory.cpp +++ b/src/pva/clientFactory.cpp @@ -4,12 +4,14 @@ * in file LICENSE that is included with this distribution. */ -#include -#include +#include #include +#include + #define epicsExportSharedSymbols +#include #include #include diff --git a/src/pva/pv/pvaVersion.h b/src/pva/pv/pvaVersion.h index a00a2a1..0781a42 100644 --- a/src/pva/pv/pvaVersion.h +++ b/src/pva/pv/pvaVersion.h @@ -111,7 +111,7 @@ private: bool _developmentFlag; }; -epicsShareExtern std::ostream& operator<<(std::ostream& o, const Version& v); +epicsShareFunc std::ostream& operator<<(std::ostream& o, const Version& v); } } diff --git a/src/remote/abstractResponseHandler.cpp b/src/remote/abstractResponseHandler.cpp index 76b6262..14d349e 100644 --- a/src/remote/abstractResponseHandler.cpp +++ b/src/remote/abstractResponseHandler.cpp @@ -4,14 +4,15 @@ * in file LICENSE that is included with this distribution. */ -#include -#include - -#include +#include #include -#include +#include + +#define epicsExportSharedSymbols +#include +#include using std::ostringstream; using std::hex; diff --git a/src/remote/beaconHandler.cpp b/src/remote/beaconHandler.cpp index 21ca28b..2fd41d7 100644 --- a/src/remote/beaconHandler.cpp +++ b/src/remote/beaconHandler.cpp @@ -4,6 +4,7 @@ * in file LICENSE that is included with this distribution. */ +#define epicsExportSharedSymbols #include #include diff --git a/src/remote/blockingTCPAcceptor.cpp b/src/remote/blockingTCPAcceptor.cpp index 63fbb28..9938419 100644 --- a/src/remote/blockingTCPAcceptor.cpp +++ b/src/remote/blockingTCPAcceptor.cpp @@ -4,18 +4,19 @@ * in file LICENSE that is included with this distribution. */ +#include + +#include +#include + +#include + +#define epicsExportSharedSymbols #include #include #include #include -#include - -#include -#include - -#include - using std::ostringstream; using namespace epics::pvData; diff --git a/src/remote/blockingTCPConnector.cpp b/src/remote/blockingTCPConnector.cpp index a1a4de6..fb08e78 100644 --- a/src/remote/blockingTCPConnector.cpp +++ b/src/remote/blockingTCPConnector.cpp @@ -4,18 +4,19 @@ * in file LICENSE that is included with this distribution. */ +#include +#include + +#include +#include + +#define epicsExportSharedSymbols #include #include #include #include #include -#include -#include - -#include -#include - using namespace epics::pvData; namespace epics { diff --git a/src/remote/blockingUDPConnector.cpp b/src/remote/blockingUDPConnector.cpp index ada3cd9..44a447c 100644 --- a/src/remote/blockingUDPConnector.cpp +++ b/src/remote/blockingUDPConnector.cpp @@ -4,13 +4,14 @@ * in file LICENSE that is included with this distribution. */ -#include -#include -#include +#include #include -#include +#define epicsExportSharedSymbols +#include +#include +#include using namespace std; using namespace epics::pvData; diff --git a/src/remote/blockingUDPTransport.cpp b/src/remote/blockingUDPTransport.cpp index 4ec1456..46c7f90 100644 --- a/src/remote/blockingUDPTransport.cpp +++ b/src/remote/blockingUDPTransport.cpp @@ -9,22 +9,23 @@ #include #endif +#include +#include + +#include +#include +#include + +#include +#include + +#define epicsExportSharedSymbols #include #include #include #include #include -#include -#include - -#include -#include -#include - -#include -#include - using namespace epics::pvData; using namespace std; using std::tr1::static_pointer_cast; diff --git a/src/remote/codec.cpp b/src/remote/codec.cpp index b62c71c..15f6c2e 100644 --- a/src/remote/codec.cpp +++ b/src/remote/codec.cpp @@ -3,28 +3,39 @@ * pvAccessCPP is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ -#ifdef _WIN32 + +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif -#include -#include - -#include -#include -#include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include #define epicsExportSharedSymbols #include #include +#include #include #include #include +#include #include #include diff --git a/src/remote/pv/blockingUDP.h b/src/remote/pv/blockingUDP.h index b49196e..606f092 100644 --- a/src/remote/pv/blockingUDP.h +++ b/src/remote/pv/blockingUDP.h @@ -505,7 +505,7 @@ private: typedef std::vector BlockingUDPTransportVector; -epicsShareExtern void initializeUDPTransports( +epicsShareFunc void initializeUDPTransports( bool serverFlag, BlockingUDPTransportVector& udpTransports, const IfaceNodeVector& ifaceList, diff --git a/src/remote/pv/channelSearchManager.h b/src/remote/pv/channelSearchManager.h index 0544d9e..18bb5de 100644 --- a/src/remote/pv/channelSearchManager.h +++ b/src/remote/pv/channelSearchManager.h @@ -14,13 +14,13 @@ #include -#include - #ifdef channelSearchManagerEpicsExportSharedSymbols # define epicsExportSharedSymbols # undef channelSearchManagerEpicsExportSharedSymbols #endif +#include + namespace epics { namespace pvAccess { diff --git a/src/remote/pv/codec.h b/src/remote/pv/codec.h index 14d7a8b..3257f7c 100644 --- a/src/remote/pv/codec.h +++ b/src/remote/pv/codec.h @@ -11,13 +11,7 @@ #include #include -#ifdef epicsExportSharedSymbols -# define abstractCodecEpicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include -#include #include #include #include @@ -37,11 +31,6 @@ #include #include -#ifdef abstractCodecEpicsExportSharedSymbols -# define epicsExportSharedSymbols -# undef abstractCodecEpicsExportSharedSymbols -#endif - #include #include #include @@ -50,7 +39,6 @@ #include #include -#include namespace epics { namespace pvAccess { diff --git a/src/remote/pv/serializationHelper.h b/src/remote/pv/serializationHelper.h index 2669990..43ce206 100644 --- a/src/remote/pv/serializationHelper.h +++ b/src/remote/pv/serializationHelper.h @@ -8,22 +8,12 @@ #ifndef SERIALIZATIONHELPER_H_ #define SERIALIZATIONHELPER_H_ -#ifdef epicsExportSharedSymbols -# define serializationHelperEpicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include #include #include #include #include -#ifdef serializationHelperEpicsExportSharedSymbols -# define epicsExportSharedSymbols -# undef serializationHelperEpicsExportSharedSymbols -#endif - #include #include diff --git a/src/remote/pv/transportRegistry.h b/src/remote/pv/transportRegistry.h index 128006f..652597e 100644 --- a/src/remote/pv/transportRegistry.h +++ b/src/remote/pv/transportRegistry.h @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #ifdef transportRegistryEpicsExportSharedSymbols @@ -30,6 +28,9 @@ # undef transportRegistryEpicsExportSharedSymbols #endif +#include +#include + namespace epics { namespace pvAccess { diff --git a/src/remote/serializationHelper.cpp b/src/remote/serializationHelper.cpp index 647d56a..94d94f4 100644 --- a/src/remote/serializationHelper.cpp +++ b/src/remote/serializationHelper.cpp @@ -4,6 +4,12 @@ * in file LICENSE that is included with this distribution. */ +#include +#include +#include +#include +#include + #define epicsExportSharedSymbols #include #include diff --git a/src/remote/simpleChannelSearchManagerImpl.cpp b/src/remote/simpleChannelSearchManagerImpl.cpp index 459aade..b889839 100644 --- a/src/remote/simpleChannelSearchManagerImpl.cpp +++ b/src/remote/simpleChannelSearchManagerImpl.cpp @@ -4,16 +4,18 @@ * in file LICENSE that is included with this distribution. */ +#include +#include +#include + +#include + +#define epicsExportSharedSymbols #include #include #include #include -#include -#include -#include -#include - using namespace std; using namespace epics::pvData; diff --git a/src/remote/transportRegistry.cpp b/src/remote/transportRegistry.cpp index b7d73b6..69225c3 100644 --- a/src/remote/transportRegistry.cpp +++ b/src/remote/transportRegistry.cpp @@ -4,6 +4,7 @@ * in file LICENSE that is included with this distribution. */ +#define epicsExportSharedSymbols #include using namespace epics::pvData; diff --git a/src/remoteClient/clientContextImpl.cpp b/src/remoteClient/clientContextImpl.cpp index d6e0910..11587a8 100644 --- a/src/remoteClient/clientContextImpl.cpp +++ b/src/remoteClient/clientContextImpl.cpp @@ -13,10 +13,10 @@ #include #include #include -#include #include #include +#define epicsExportSharedSymbols #include #include #include @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/src/remoteClient/pv/clientContextImpl.h b/src/remoteClient/pv/clientContextImpl.h index d74b987..5d5488b 100644 --- a/src/remoteClient/pv/clientContextImpl.h +++ b/src/remoteClient/pv/clientContextImpl.h @@ -131,7 +131,7 @@ public: virtual void destroy() = 0; }; -epicsShareExtern ChannelProvider::shared_pointer createClientProvider(const Configuration::shared_pointer& conf); +epicsShareFunc ChannelProvider::shared_pointer createClientProvider(const Configuration::shared_pointer& conf); } } diff --git a/src/rpcService/pv/rpcServer.h b/src/rpcService/pv/rpcServer.h index abc6c3c..b6ead62 100644 --- a/src/rpcService/pv/rpcServer.h +++ b/src/rpcService/pv/rpcServer.h @@ -67,7 +67,7 @@ public: }; -epicsShareExtern Channel::shared_pointer createRPCChannel(ChannelProvider::shared_pointer const & provider, +epicsShareFunc Channel::shared_pointer createRPCChannel(ChannelProvider::shared_pointer const & provider, std::string const & channelName, ChannelRequester::shared_pointer const & channelRequester, Service::shared_pointer const & rpcService); diff --git a/src/server/baseChannelRequester.cpp b/src/server/baseChannelRequester.cpp index 8418c66..a77945c 100644 --- a/src/server/baseChannelRequester.cpp +++ b/src/server/baseChannelRequester.cpp @@ -4,6 +4,7 @@ * in file LICENSE that is included with this distribution. */ +#define epicsExportSharedSymbols #include using namespace epics::pvData; diff --git a/src/server/beaconEmitter.cpp b/src/server/beaconEmitter.cpp index eca25b7..bdce554 100644 --- a/src/server/beaconEmitter.cpp +++ b/src/server/beaconEmitter.cpp @@ -4,16 +4,16 @@ * in file LICENSE that is included with this distribution. */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif -#include -#include - -#include #include +#define epicsExportSharedSymbols +#include +#include +#include #include using namespace std; diff --git a/src/server/pv/responseHandlers.h b/src/server/pv/responseHandlers.h index 44447ed..8fedbad 100644 --- a/src/server/pv/responseHandlers.h +++ b/src/server/pv/responseHandlers.h @@ -7,18 +7,8 @@ #ifndef RESPONSEHANDLERS_H_ #define RESPONSEHANDLERS_H_ -#ifdef epicsExportSharedSymbols -# define responseHandlersEpicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include -#ifdef responseHandlersEpicsExportSharedSymbols -# define epicsExportSharedSymbols -# undef responseHandlersEpicsExportSharedSymbols -#endif - #include #include #include diff --git a/src/server/pv/serverContext.h b/src/server/pv/serverContext.h index dcae129..fde37e1 100644 --- a/src/server/pv/serverContext.h +++ b/src/server/pv/serverContext.h @@ -453,7 +453,7 @@ private: }; -epicsShareExtern ServerContext::shared_pointer startPVAServer( +epicsShareFunc ServerContext::shared_pointer startPVAServer( std::string const & providerNames = PVACCESS_ALL_PROVIDERS, int timeToRun = 0, bool runInSeparateThread = false, diff --git a/src/server/responseHandlers.cpp b/src/server/responseHandlers.cpp index f2c1258..7463a0c 100644 --- a/src/server/responseHandlers.cpp +++ b/src/server/responseHandlers.cpp @@ -4,30 +4,39 @@ * in file LICENSE that is included with this distribution. */ -#ifdef __vxworks -#include -#endif - -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX -#include #endif #include #include #include +#ifdef _WIN32 +#define GETPID() GetCurrentProcessId() +#endif + +#ifdef vxWorks +#include +#define GETPID() taskIdSelf() +#endif + +#ifndef GETPID +#define GETPID() getpid() +#endif + +#include +#include + +#include +#include + +#define epicsExportSharedSymbols #include #include #include #include - -#include - -#include -#include #include - #include #include #include @@ -618,13 +627,7 @@ public: result->getSubFieldT("host")->put(hostName); std::stringstream sspid; -#ifdef __vxworks - sspid << taskIdSelf(); -#elif defined(_WIN32) - sspid << _getpid(); -#else - sspid << getpid(); -#endif + sspid << GETPID(); result->getSubFieldT("process")->put(sspid.str()); char timeText[64]; diff --git a/src/server/serverChannelImpl.cpp b/src/server/serverChannelImpl.cpp index a8204d7..db08f83 100644 --- a/src/server/serverChannelImpl.cpp +++ b/src/server/serverChannelImpl.cpp @@ -4,6 +4,7 @@ * in file LICENSE that is included with this distribution. */ +#define epicsExportSharedSymbols #include using namespace epics::pvData; diff --git a/src/server/serverContext.cpp b/src/server/serverContext.cpp index 14f7cf1..012128d 100644 --- a/src/server/serverContext.cpp +++ b/src/server/serverContext.cpp @@ -6,6 +6,10 @@ #include +#include +#include +#include + #define epicsExportSharedSymbols #include #include diff --git a/src/utils/inetAddressUtil.cpp b/src/utils/inetAddressUtil.cpp index ad95000..c1b17b0 100644 --- a/src/utils/inetAddressUtil.cpp +++ b/src/utils/inetAddressUtil.cpp @@ -9,11 +9,13 @@ #include #include -#include -#include #include #include +#include +#include +#include + #define epicsExportSharedSymbols #include diff --git a/src/utils/introspectionRegistry.cpp b/src/utils/introspectionRegistry.cpp index 87917e0..0d25665 100644 --- a/src/utils/introspectionRegistry.cpp +++ b/src/utils/introspectionRegistry.cpp @@ -4,6 +4,7 @@ * in file LICENSE that is included with this distribution. */ +#define epicsExportSharedSymbols #include #include diff --git a/src/utils/logger.cpp b/src/utils/logger.cpp index bf48568..0efaf59 100644 --- a/src/utils/logger.cpp +++ b/src/utils/logger.cpp @@ -10,15 +10,14 @@ #include #include +#include +#include +#include + #include #include #include -#include -#include - -#include - #define epicsExportSharedSymbols #include diff --git a/src/utils/pv/inetAddressUtil.h b/src/utils/pv/inetAddressUtil.h index 196a14e..33db442 100644 --- a/src/utils/pv/inetAddressUtil.h +++ b/src/utils/pv/inetAddressUtil.h @@ -9,23 +9,12 @@ #include -#ifdef epicsExportSharedSymbols -# define inetAddressUtilExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#include +#include #include #include -#include - -#ifdef inetAddressUtilExportSharedSymbols -# define epicsExportSharedSymbols -# undef inetAddressUtilExportSharedSymbols -#endif - -#include - // TODO implement using smart pointers diff --git a/src/utils/pv/logger.h b/src/utils/pv/logger.h index 8d6ddc6..cfdbdbb 100644 --- a/src/utils/pv/logger.h +++ b/src/utils/pv/logger.h @@ -7,18 +7,7 @@ #ifndef LOGGER_H_ #define LOGGER_H_ -#ifdef epicsExportSharedSymbols -# define loggerEpicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - -#include -#include - -#ifdef loggerEpicsExportSharedSymbols -# define epicsExportSharedSymbols -#undef loggerEpicsExportSharedSymbols -#endif +#include #include @@ -48,9 +37,9 @@ OFF */ -epicsShareExtern void pvAccessLog(pvAccessLogLevel level, const char* format, ...); -epicsShareExtern void pvAccessSetLogLevel(pvAccessLogLevel level); -epicsShareExtern bool pvAccessIsLoggable(pvAccessLogLevel level); +epicsShareFunc void pvAccessLog(pvAccessLogLevel level, const char* format, ...); +epicsShareFunc void pvAccessSetLogLevel(pvAccessLogLevel level); +epicsShareFunc bool pvAccessIsLoggable(pvAccessLogLevel level); #if defined (__GNUC__) && __GNUC__ < 3 #define LOG(level, format, ARGS...) pvAccessLog(level, format, ##ARGS) @@ -76,7 +65,7 @@ epicsShareExtern bool pvAccessIsLoggable(pvAccessLogLevel level); * @param[in] fname The file to write to. If the file exists, it * is opened for append. */ -epicsShareExtern void createFileLogger( std::string const & fname ); +epicsShareFunc void createFileLogger( std::string const & fname ); } } diff --git a/src/utils/referenceCountingLock.cpp b/src/utils/referenceCountingLock.cpp index a4c4149..e2c1e74 100644 --- a/src/utils/referenceCountingLock.cpp +++ b/src/utils/referenceCountingLock.cpp @@ -4,6 +4,7 @@ * in file LICENSE that is included with this distribution. */ +#define epicsExportSharedSymbols #include namespace epics { diff --git a/testApp/remote/channelAccessIFTest.cpp b/testApp/remote/channelAccessIFTest.cpp index 953b826..c849b2a 100644 --- a/testApp/remote/channelAccessIFTest.cpp +++ b/testApp/remote/channelAccessIFTest.cpp @@ -1987,7 +1987,7 @@ void ChannelAccessIFTest::test_channelArray() { PVDoubleArrayPtr array3 = TR1::static_pointer_cast(arrayReq->getArray()); PVDoubleArray::const_svector data3(array3->view()); testOk(data3.size() == newLength, - "%s: data size after calling setLength should be %zu", CURRENT_FUNCTION, newLength); + "%s: data size after calling setLength should be %lu", CURRENT_FUNCTION, (unsigned long) newLength); testOk(data3[0] == 1.1 , "%s: 3.check 0: %f", CURRENT_FUNCTION, data3[0]); testOk(data3[1] == 2.2 , "%s: 3.check 1: %f", CURRENT_FUNCTION, data3[1]); @@ -2007,8 +2007,8 @@ void ChannelAccessIFTest::test_channelArray() { PVDoubleArrayPtr array4 = TR1::static_pointer_cast(arrayReq->getArray()); PVDoubleArray::const_svector data4(array4->view()); - testOk(data4.size() == bigCapacity, "%s: data size after calling setLength should be %zu", - CURRENT_FUNCTION, bigCapacity); + testOk(data4.size() == bigCapacity, "%s: data size after calling setLength should be %lu", + CURRENT_FUNCTION, (unsigned long) bigCapacity); testOk(data4[0] == 1.1 , "%s: 4.check 0: %f", CURRENT_FUNCTION, data4[0]); testOk(data4[1] == 2.2 , "%s: 4.check 1: %f", CURRENT_FUNCTION, data4[1]); /* @@ -2022,7 +2022,7 @@ void ChannelAccessIFTest::test_channelArray() { if (i == bigCapacity) testOk("%s: 4.check: all data 0.0", CURRENT_FUNCTION); else - testFail("%s: 4.check: data at %zu should be 0.0 but was %f", CURRENT_FUNCTION, i, data4[i]); + testFail("%s: 4.check: data at %lu should be 0.0 but was %f", CURRENT_FUNCTION, (unsigned long) i, data4[i]); } else { testFail("%s: will not check the rest of the array if the size is not correct", CURRENT_FUNCTION); @@ -2040,7 +2040,7 @@ void ChannelAccessIFTest::test_channelArray() { testFail("%s: an array getLength failed", CURRENT_FUNCTION); return; } - testOk(arrayReq->getLength() == newLen, "%s: retrieved length should be %zu", CURRENT_FUNCTION, newLen); + testOk(arrayReq->getLength() == newLen, "%s: retrieved length should be %lu", CURRENT_FUNCTION, (unsigned long) newLen); channel->destroy(); @@ -2180,7 +2180,7 @@ void ChannelAccessIFTest::test_stressPutAndGetLargeArray() { for (size_t len = minSize; len <= maxSize; len+=step) { - //testDiag("%s: array size %zd", CURRENT_FUNCTION, len); + //testDiag("%s: array size %lu", CURRENT_FUNCTION, (unsigned long) len); // prepare data newdata.resize(len); @@ -2192,19 +2192,19 @@ void ChannelAccessIFTest::test_stressPutAndGetLargeArray() { bool succStatus = putReq->syncPut(false, getTimeoutSec()); if (!succStatus) { - testFail("%s: sync put failed at array size %zd", CURRENT_FUNCTION, len); + testFail("%s: sync put failed at array size %lu", CURRENT_FUNCTION, (unsigned long) len); return; } succStatus = putReq->syncGet(getTimeoutSec()); if (!succStatus) { - testFail("%s: sync get failed at array size %zd", CURRENT_FUNCTION, len); + testFail("%s: sync get failed at array size %lu", CURRENT_FUNCTION, (unsigned long) len); return; } // length check if (value->getLength() != len) { - testFail("%s: length does not math %zd != %zd", CURRENT_FUNCTION, len, value->getLength()); + testFail("%s: length does not match %lu != %lu", CURRENT_FUNCTION, (unsigned long) len, (unsigned long) value->getLength()); return; } @@ -2212,7 +2212,7 @@ void ChannelAccessIFTest::test_stressPutAndGetLargeArray() { PVDoubleArray::const_svector data(value->view()); for (size_t i = 0; i < len; i++) { if (i != data[i]) // NOTE: floating-point value comparison without delta - testFail("%s: data slot %zd does not match %f != %f at array size %zd", CURRENT_FUNCTION, i, (double)i, data[i], len); + testFail("%s: data slot %lu does not match %f != %f at array size %lu", CURRENT_FUNCTION, (unsigned long) i, (double)i, data[i], (unsigned long) len); } } diff --git a/testApp/remote/testCodec.cpp b/testApp/remote/testCodec.cpp index 89a9fb0..73fbabb 100644 --- a/testApp/remote/testCodec.cpp +++ b/testApp/remote/testCodec.cpp @@ -2,7 +2,7 @@ * testCodec.cpp */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif diff --git a/testApp/remote/testGetPerformance.cpp b/testApp/remote/testGetPerformance.cpp index 6f5735f..ae12502 100644 --- a/testApp/remote/testGetPerformance.cpp +++ b/testApp/remote/testGetPerformance.cpp @@ -17,7 +17,7 @@ #include #ifdef _WIN32 -#include +#include #else #include #endif diff --git a/testApp/remote/testMonitorPerformance.cpp b/testApp/remote/testMonitorPerformance.cpp index 5b66f21..58b1970 100644 --- a/testApp/remote/testMonitorPerformance.cpp +++ b/testApp/remote/testMonitorPerformance.cpp @@ -17,7 +17,7 @@ #include #ifdef _WIN32 -#include +#include #else #include #endif diff --git a/testApp/remote/testServer.cpp b/testApp/remote/testServer.cpp index 7f9314e..7c7dce1 100644 --- a/testApp/remote/testServer.cpp +++ b/testApp/remote/testServer.cpp @@ -2,7 +2,7 @@ * testServer.cpp */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif diff --git a/testApp/utils/testInetAddressUtils.cpp b/testApp/utils/testInetAddressUtils.cpp index 7c2e0a3..1d84e73 100644 --- a/testApp/utils/testInetAddressUtils.cpp +++ b/testApp/utils/testInetAddressUtils.cpp @@ -217,7 +217,7 @@ void test_getLoopbackNIF() #ifdef _WIN32 // needed for ip_mreq -#include +#include #endif void test_multicastLoopback()