summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-05-06 17:21:30 +0200
committerBenoit Foucher <benoit@zeroc.com>2015-05-06 17:21:30 +0200
commit0015b0097b89806b407e38df9399c358a82646f7 (patch)
treee07664cfc01e1fe8dbd4a83b88363ef170ab237c /cpp/src
parentICE-6484 java exceptions test fails with --cross=js (diff)
downloadice-0015b0097b89806b407e38df9399c358a82646f7.tar.bz2
ice-0015b0097b89806b407e38df9399c358a82646f7.tar.xz
ice-0015b0097b89806b407e38df9399c358a82646f7.zip
Fixed generated code to not instantiate templates if ICE_STATIC_LIBS is defined, minor WinRT test fixes
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Buffer.cpp1
-rw-r--r--cpp/src/Ice/EndpointI.h1
-rw-r--r--cpp/src/Ice/LoggerI.cpp1
-rw-r--r--cpp/src/Ice/ObjectFactoryManager.cpp2
-rw-r--r--cpp/src/Ice/Protocol.cpp1
-rw-r--r--cpp/src/Ice/ResponseHandler.h1
-rw-r--r--cpp/src/Ice/winrt/Makefile.mak1
-rw-r--r--cpp/src/slice2cpp/Gen.cpp5
8 files changed, 4 insertions, 9 deletions
diff --git a/cpp/src/Ice/Buffer.cpp b/cpp/src/Ice/Buffer.cpp
index c3c882488a5..8f29d39b6a6 100644
--- a/cpp/src/Ice/Buffer.cpp
+++ b/cpp/src/Ice/Buffer.cpp
@@ -9,7 +9,6 @@
#include <Ice/Buffer.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
using namespace std;
using namespace Ice;
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h
index 8a6cd4c6701..df41372bd82 100644
--- a/cpp/src/Ice/EndpointI.h
+++ b/cpp/src/Ice/EndpointI.h
@@ -11,7 +11,6 @@
#define ICE_ENDPOINT_I_H
#include <Ice/EndpointIF.h>
-#include <Ice/BasicStream.h>
#include <Ice/Endpoint.h>
#include <Ice/EndpointTypes.h>
#include <Ice/TransceiverF.h>
diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp
index 26868805206..fcc3ac1d79c 100644
--- a/cpp/src/Ice/LoggerI.cpp
+++ b/cpp/src/Ice/LoggerI.cpp
@@ -18,7 +18,6 @@
#endif
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
using namespace std;
using namespace Ice;
diff --git a/cpp/src/Ice/ObjectFactoryManager.cpp b/cpp/src/Ice/ObjectFactoryManager.cpp
index 4f9c11bc695..835df0b588e 100644
--- a/cpp/src/Ice/ObjectFactoryManager.cpp
+++ b/cpp/src/Ice/ObjectFactoryManager.cpp
@@ -12,8 +12,6 @@
#include <Ice/ObjectFactory.h>
#include <Ice/Functional.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
-
using namespace std;
using namespace Ice;
using namespace IceInternal;
diff --git a/cpp/src/Ice/Protocol.cpp b/cpp/src/Ice/Protocol.cpp
index 8816e68fb4c..01f35c19a04 100644
--- a/cpp/src/Ice/Protocol.cpp
+++ b/cpp/src/Ice/Protocol.cpp
@@ -9,7 +9,6 @@
#include <Ice/Protocol.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
namespace IceInternal
{
diff --git a/cpp/src/Ice/ResponseHandler.h b/cpp/src/Ice/ResponseHandler.h
index c82080526c0..23ed39fd70d 100644
--- a/cpp/src/Ice/ResponseHandler.h
+++ b/cpp/src/Ice/ResponseHandler.h
@@ -15,7 +15,6 @@
#include <Ice/Config.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
#include <Ice/ResponseHandlerF.h>
namespace IceInternal
diff --git a/cpp/src/Ice/winrt/Makefile.mak b/cpp/src/Ice/winrt/Makefile.mak
index ddaf9c87dc8..52254850db3 100644
--- a/cpp/src/Ice/winrt/Makefile.mak
+++ b/cpp/src/Ice/winrt/Makefile.mak
@@ -369,6 +369,7 @@ clean::
-del /q $(SOURCE_DIR)\ServantLocatorF.cpp $(HDIR)\ServantLocatorF.h
-del /q $(SOURCE_DIR)\ServantLocator.cpp $(HDIR)\ServantLocator.h
-del /q $(SOURCE_DIR)\SliceChecksumDict.cpp $(HDIR)\SliceChecksumDict.h
+ -del /q $(SOURCE_DIR)\Version.cpp $(HDIR)\Version.h
-del /q EndpointInfo.cpp $(headerdir)\IceSSL\EndpointInfo.h
-del /q ConnectionInfo.cpp $(headerdir)\IceSSL\ConnectionInfo.h
-del /q $(ARCH)\$(CONFIG)\*.obj
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 9e8d68722cb..74bf4315893 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -5177,7 +5177,8 @@ Slice::Gen::StreamVisitor::visitStructStart(const StructPtr& p)
//
// We tell "importers" that the implementation exports these instantiations
//
- H << nl << "#if defined(ICE_HAS_DECLSPEC_IMPORT_EXPORT) && !defined(" << _dllExport.substr(0, _dllExport.size() - 1) + "_EXPORTS)";
+ H << nl << "#if defined(ICE_HAS_DECLSPEC_IMPORT_EXPORT) && !defined(";
+ H << _dllExport.substr(0, _dllExport.size() - 1) + "_EXPORTS) && !defined(ICE_STATIC_LIBS)";
H << nl << "template struct " << _dllExport << "StreamWriter< " << fullStructName << ", ::IceInternal::BasicStream>;";
H << nl << "template struct " << _dllExport << "StreamReader< " << fullStructName << ", ::IceInternal::BasicStream>;";
H << nl << "#endif" << nl;
@@ -5185,7 +5186,7 @@ Slice::Gen::StreamVisitor::visitStructStart(const StructPtr& p)
//
// The instantations:
//
- C << nl << "#ifdef ICE_HAS_DECLSPEC_IMPORT_EXPORT";
+ C << nl << "#if defined(ICE_HAS_DECLSPEC_IMPORT_EXPORT) && !defined(ICE_STATIC_LIBS)";
C << nl << "template struct " << _dllExport << "StreamWriter< " << fullStructName << ", ::IceInternal::BasicStream>;";
C << nl << "template struct " << _dllExport << "StreamReader< " << fullStructName << ", ::IceInternal::BasicStream>;";
C << nl << "#endif";