summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Glacier2Lib/winrt/Makefile.mak4
-rw-r--r--cpp/src/Ice/Buffer.cpp5
-rw-r--r--cpp/src/Ice/EndpointI.h1
-rw-r--r--cpp/src/Ice/LoggerI.cpp9
-rw-r--r--cpp/src/Ice/ObjectFactoryManager.cpp17
-rw-r--r--cpp/src/Ice/Protocol.cpp13
-rw-r--r--cpp/src/Ice/ResponseHandler.h5
-rw-r--r--cpp/src/Ice/winrt/Makefile.mak9
-rw-r--r--cpp/src/Ice/winrt/StreamEndpointI.h2
-rw-r--r--cpp/src/IceGridLib/winrt/Makefile.mak4
-rw-r--r--cpp/src/IceStormLib/winrt/Makefile.mak4
-rw-r--r--cpp/src/IceUtil/winrt/Makefile.mak2
-rw-r--r--cpp/src/Makefile.mak16
13 files changed, 55 insertions, 36 deletions
diff --git a/cpp/src/Glacier2Lib/winrt/Makefile.mak b/cpp/src/Glacier2Lib/winrt/Makefile.mak
index 8a25fd9a085..19d3dcbb95d 100644
--- a/cpp/src/Glacier2Lib/winrt/Makefile.mak
+++ b/cpp/src/Glacier2Lib/winrt/Makefile.mak
@@ -43,11 +43,11 @@ SLICE_SRCS = Glacier2\Metrics.ice \
Glacier2\SSLInfo.ice
PDBNAME = $(LIBNAME:.lib=.pdb)
-CPPFLAGS = /Fd$(PDBNAME) -I..\.. $(CPPFLAGS) -DGLACIER2_API_EXPORTS -DWIN32_LEAN_AND_MEAN
+CPPFLAGS = /Fd$(PDBNAME) -I..\.. $(CPPFLAGS) -DICE_BUILDING_GLACIER2 -DWIN32_LEAN_AND_MEAN
!include $(top_srcdir)\config\Make.rules.mak
-SLICE2CPPFLAGS = --ice --include-dir Glacier2 --dll-export GLACIER2_API $(SLICE2CPPFLAGS)
+SLICE2CPPFLAGS = --ice --include-dir Glacier2 $(SLICE2CPPFLAGS)
$(LIBNAME): $(OBJS) $(HDIR)\PermissionsVerifierF.h $(HDIR)\RouterF.h sdks
$(AR) $(ARFLAGS) $(OBJS) /out:$(LIBNAME)
diff --git a/cpp/src/Ice/Buffer.cpp b/cpp/src/Ice/Buffer.cpp
index 0240a81ec6c..c3c882488a5 100644
--- a/cpp/src/Ice/Buffer.cpp
+++ b/cpp/src/Ice/Buffer.cpp
@@ -9,6 +9,7 @@
#include <Ice/Buffer.h>
#include <Ice/LocalException.h>
+#include <Ice/BasicStream.h>
using namespace std;
using namespace Ice;
@@ -18,7 +19,7 @@ void
IceInternal::Buffer::swapBuffer(Buffer& other)
{
b.swap(other.b);
- std::swap(i, other.i);
+ std::swap(i, other.i);
}
IceInternal::Buffer::Container::Container() :
@@ -87,7 +88,7 @@ IceInternal::Buffer::Container::reserve(size_type n)
{
return;
}
-
+
pointer p = reinterpret_cast<pointer>(::realloc(_buf, _capacity));
if(!p)
{
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h
index df41372bd82..8a6cd4c6701 100644
--- a/cpp/src/Ice/EndpointI.h
+++ b/cpp/src/Ice/EndpointI.h
@@ -11,6 +11,7 @@
#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 f3e87785a59..26868805206 100644
--- a/cpp/src/Ice/LoggerI.cpp
+++ b/cpp/src/Ice/LoggerI.cpp
@@ -18,6 +18,7 @@
#endif
#include <Ice/LocalException.h>
+#include <Ice/BasicStream.h>
using namespace std;
using namespace Ice;
@@ -48,7 +49,7 @@ Init init;
}
-Ice::LoggerI::LoggerI(const string& prefix, const string& file,
+Ice::LoggerI::LoggerI(const string& prefix, const string& file,
bool convert, const IceUtil::StringConverterPtr& converter) :
_prefix(prefix),
_convert(convert),
@@ -153,7 +154,7 @@ Ice::LoggerI::write(const string& message, bool indent)
#elif defined(_WIN32)
//
// Convert the message from the native narrow string encoding to the console
- // code page encoding for printing. If the _convert member is set to false
+ // code page encoding for printing. If the _convert member is set to false
// we don't do any conversion.
//
if(!_convert)
@@ -172,11 +173,11 @@ Ice::LoggerI::write(const string& message, bool indent)
{
// Convert message to UTF-8
string u8s = IceUtil::nativeToUTF8(s, _converter);
-
+
// Then from UTF-8 to console CP
string consoleString;
_consoleConverter->fromUTF8(reinterpret_cast<const Byte*>(u8s.data()),
- reinterpret_cast<const Byte*>(u8s.data() + u8s.size()),
+ reinterpret_cast<const Byte*>(u8s.data() + u8s.size()),
consoleString);
// We cannot use cerr here as writing to console using cerr
diff --git a/cpp/src/Ice/ObjectFactoryManager.cpp b/cpp/src/Ice/ObjectFactoryManager.cpp
index 2627bd29196..4f9c11bc695 100644
--- a/cpp/src/Ice/ObjectFactoryManager.cpp
+++ b/cpp/src/Ice/ObjectFactoryManager.cpp
@@ -12,6 +12,7 @@
#include <Ice/ObjectFactory.h>
#include <Ice/Functional.h>
#include <Ice/LocalException.h>
+#include <Ice/BasicStream.h>
using namespace std;
using namespace Ice;
@@ -42,7 +43,7 @@ IceInternal::ObjectFactoryManager::remove(const string& id)
ObjectFactoryPtr factory = 0;
{
IceUtil::Mutex::Lock sync(*this);
-
+
FactoryMap::iterator p = _factoryMap.end();
if(_factoryMapHint != _factoryMap.end())
{
@@ -51,7 +52,7 @@ IceInternal::ObjectFactoryManager::remove(const string& id)
p = _factoryMapHint;
}
}
-
+
if(p == _factoryMap.end())
{
p = _factoryMap.find(id);
@@ -64,9 +65,9 @@ IceInternal::ObjectFactoryManager::remove(const string& id)
}
}
assert(p != _factoryMap.end());
-
+
factory = p->second;
-
+
if(p == _factoryMapHint)
{
_factoryMap.erase(p++);
@@ -77,7 +78,7 @@ IceInternal::ObjectFactoryManager::remove(const string& id)
_factoryMap.erase(p);
}
}
-
+
//
// Destroy outside the lock
//
@@ -89,7 +90,7 @@ ObjectFactoryPtr
IceInternal::ObjectFactoryManager::find(const string& id) const
{
IceUtil::Mutex::Lock sync(*this);
-
+
FactoryMap& factoryMap = const_cast<FactoryMap&>(_factoryMap);
FactoryMap::iterator p = factoryMap.end();
@@ -100,12 +101,12 @@ IceInternal::ObjectFactoryManager::find(const string& id) const
p = _factoryMapHint;
}
}
-
+
if(p == factoryMap.end())
{
p = factoryMap.find(id);
}
-
+
if(p != factoryMap.end())
{
_factoryMapHint = p;
diff --git a/cpp/src/Ice/Protocol.cpp b/cpp/src/Ice/Protocol.cpp
index 341e82497c3..8816e68fb4c 100644
--- a/cpp/src/Ice/Protocol.cpp
+++ b/cpp/src/Ice/Protocol.cpp
@@ -9,13 +9,14 @@
#include <Ice/Protocol.h>
#include <Ice/LocalException.h>
+#include <Ice/BasicStream.h>
namespace IceInternal
{
const Ice::Byte magic[] = { 0x49, 0x63, 0x65, 0x50 }; // 'I', 'c', 'e', 'P'
-const Ice::Byte requestHdr[] =
+const Ice::Byte requestHdr[] =
{
magic[0],
magic[1],
@@ -47,7 +48,7 @@ const Ice::Byte requestBatchHdr[] =
0, 0, 0, 0 // Number of requests in batch (placeholder)
};
-const Ice::Byte replyHdr[] =
+const Ice::Byte replyHdr[] =
{
magic[0],
magic[1],
@@ -81,7 +82,7 @@ stringToMajorMinor(const std::string& str, Ice::Byte& major, Ice::Byte& minor)
ex.str = "invalid major version value `" + str + "'";
throw ex;
}
-
+
std::istringstream minStr(str.substr(pos + 1, std::string::npos));
Ice::Int minVersion;
if(!(minStr >> minVersion) || !minStr.eof())
@@ -97,12 +98,12 @@ stringToMajorMinor(const std::string& str, Ice::Byte& major, Ice::Byte& minor)
ex.str = "range error in version `" + str + "'";
throw ex;
}
-
+
major = static_cast<Ice::Byte>(majVersion);
minor = static_cast<Ice::Byte>(minVersion);
}
-void
+void
throwUnsupportedProtocolException(const char* f, int l, const Ice::ProtocolVersion& v, const Ice::ProtocolVersion& s)
{
throw Ice::UnsupportedProtocolException(f, l, "", v, s);
@@ -126,7 +127,7 @@ const ProtocolVersion currentProtocol = { IceInternal::protocolMajor, IceInterna
// The encoding to use for protocol messages, this version is tied to
// the protocol version.
//
-const EncodingVersion currentProtocolEncoding = { IceInternal::protocolEncodingMajor,
+const EncodingVersion currentProtocolEncoding = { IceInternal::protocolEncodingMajor,
IceInternal::protocolEncodingMinor };
const ProtocolVersion Protocol_1_0 = { 1, 0 };
diff --git a/cpp/src/Ice/ResponseHandler.h b/cpp/src/Ice/ResponseHandler.h
index 80492d252fb..c82080526c0 100644
--- a/cpp/src/Ice/ResponseHandler.h
+++ b/cpp/src/Ice/ResponseHandler.h
@@ -15,6 +15,7 @@
#include <Ice/Config.h>
#include <Ice/LocalException.h>
+#include <Ice/BasicStream.h>
#include <Ice/ResponseHandlerF.h>
namespace IceInternal
@@ -25,9 +26,9 @@ class BasicStream;
class ResponseHandler : virtual public ::IceUtil::Shared
{
public:
-
+
virtual ~ResponseHandler();
-
+
virtual void sendResponse(Ice::Int, BasicStream*, Ice::Byte, bool) = 0;
virtual void sendNoResponse() = 0;
virtual bool systemException(Ice::Int, const Ice::SystemException&, bool) = 0;
diff --git a/cpp/src/Ice/winrt/Makefile.mak b/cpp/src/Ice/winrt/Makefile.mak
index 18652ff0975..ddaf9c87dc8 100644
--- a/cpp/src/Ice/winrt/Makefile.mak
+++ b/cpp/src/Ice/winrt/Makefile.mak
@@ -213,10 +213,9 @@ HDIR = $(headerdir)\Ice
SDIR = $(slicedir)\Ice
PDBNAME = $(LIBNAME:.lib=.pdb)
-CPPFLAGS = /Fd$(PDBNAME) -I. -I..\.. $(CPPFLAGS) -DICE_API_EXPORTS -DWIN32_LEAN_AND_MEAN
-SLICE2CPPFLAGS = --ice $(SLICE2CPPFLAGS)
-CORE_SLICE2CPPFLAGS = --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS)
-SSL_SLICE2CPPFLAGS = --include-dir IceSSL --dll-export ICE_SSL_API $(SLICE2CPPFLAGS)
+CPPFLAGS = /Fd$(PDBNAME) -I. -I..\.. -DICE_BUILDING_ICE -DICE_BUILDING_ICESSL -DWIN32_LEAN_AND_MEAN $(CPPFLAGS)
+CORE_SLICE2CPPFLAGS = --ice --include-dir Ice $(SLICE2CPPFLAGS)
+SSL_SLICE2CPPFLAGS = --ice --include-dir IceSSL $(SLICE2CPPFLAGS)
!include $(top_srcdir)\config\Make.rules.mak
@@ -238,7 +237,7 @@ $(LIBNAME): $(LOCAL_OBJS) $(OBJS) sdks
@if not exist "$(ARCH)\$(CONFIG)" mkdir $(ARCH)\$(CONFIG)
$(CXX) /c /Fo$(ARCH)\$(CONFIG)\ $(CPPFLAGS) $(CXXFLAGS) $<
-.cpp{$(ARCH)\$(CONFIG)\IceDiscovery\}.obj::
+.cpp{$(ARCH)\$(CONFIG)\IceDiscovery\}.obj::
@if not exist "$(ARCH)\$(CONFIG)\IceDiscovery" mkdir $(ARCH)\$(CONFIG)\IceDiscovery
$(CXX) /c /Fo$(ARCH)\$(CONFIG)\IceDiscovery\ $(CPPFLAGS) $(CXXFLAGS) $<
diff --git a/cpp/src/Ice/winrt/StreamEndpointI.h b/cpp/src/Ice/winrt/StreamEndpointI.h
index d3f9f1bbe66..a275081964e 100644
--- a/cpp/src/Ice/winrt/StreamEndpointI.h
+++ b/cpp/src/Ice/winrt/StreamEndpointI.h
@@ -20,7 +20,7 @@
namespace IceInternal
{
-class StreamEndpointI : public IPEndpointI, WSEndpointDelegate
+class StreamEndpointI : public IPEndpointI, public WSEndpointDelegate
{
public:
diff --git a/cpp/src/IceGridLib/winrt/Makefile.mak b/cpp/src/IceGridLib/winrt/Makefile.mak
index fa91cbb6d5f..c3cb21b7e40 100644
--- a/cpp/src/IceGridLib/winrt/Makefile.mak
+++ b/cpp/src/IceGridLib/winrt/Makefile.mak
@@ -47,8 +47,8 @@ HDIR = $(headerdir)\IceGrid
SDIR = $(slicedir)\IceGrid
PDBNAME = $(LIBNAME:.lib=.pdb)
-CPPFLAGS = /Fd$(PDBNAME) -I..\.. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-SLICE2CPPFLAGS = --checksum --ice --include-dir IceGrid --dll-export ICE_GRID_API
+CPPFLAGS = /Fd$(PDBNAME) -I..\.. $(CPPFLAGS) -DICE_BUILDING_ICEGRID -DWIN32_LEAN_AND_MEAN
+SLICE2CPPFLAGS = --checksum --ice --include-dir IceGrid
!include $(top_srcdir)\config\Make.rules.mak
diff --git a/cpp/src/IceStormLib/winrt/Makefile.mak b/cpp/src/IceStormLib/winrt/Makefile.mak
index 8f4bfce5c45..450cd665b41 100644
--- a/cpp/src/IceStormLib/winrt/Makefile.mak
+++ b/cpp/src/IceStormLib/winrt/Makefile.mak
@@ -31,9 +31,9 @@ HDIR = $(headerdir)\IceStorm
SDIR = $(slicedir)\IceStorm
PDBNAME = $(LIBNAME:.lib=.pdb)
-CPPFLAGS = /Fd$(PDBNAME) -I..\.. -DWIN32_LEAN_AND_MEAN
+CPPFLAGS = /Fd$(PDBNAME) -I..\.. -DICE_BUILDING_ICESTORM -DWIN32_LEAN_AND_MEAN
ICECPPFLAGS = -I..
-SLICE2CPPFLAGS = --ice --include-dir IceStorm --checksum --dll-export ICE_STORM_LIB_API
+SLICE2CPPFLAGS = --ice --include-dir IceStorm --checksum
!include $(top_srcdir)\config\Make.rules.mak
diff --git a/cpp/src/IceUtil/winrt/Makefile.mak b/cpp/src/IceUtil/winrt/Makefile.mak
index c99e4150b08..b5d082c714e 100644
--- a/cpp/src/IceUtil/winrt/Makefile.mak
+++ b/cpp/src/IceUtil/winrt/Makefile.mak
@@ -45,7 +45,7 @@ SRCS = $(SRCS:Retail\=..\)
SRCS = $(SRCS:Debug\=..\)
PDBNAME = $(LIBNAME:.lib=.pdb)
-CPPFLAGS = /Fd$(PDBNAME) $(CPPFLAGS) -DICE_UTIL_API_EXPORTS -I..\..\ -DWIN32_LEAN_AND_MEAN
+CPPFLAGS = /Fd$(PDBNAME) $(CPPFLAGS) -I..\..\ -DICE_BUILDING_ICEUTIL -DWIN32_LEAN_AND_MEAN
!include $(top_srcdir)/config/Make.rules.mak
diff --git a/cpp/src/Makefile.mak b/cpp/src/Makefile.mak
index 5d3f4cc1f81..2c8af56621f 100644
--- a/cpp/src/Makefile.mak
+++ b/cpp/src/Makefile.mak
@@ -12,11 +12,13 @@ top_srcdir = ..
!include $(top_srcdir)/config/Make.rules.mak
!if "$(WINRT)" == "yes"
-SUBDIRS = IceUtil\winrt \
+SUBDIRS = IceUtil Slice slice2cpp
+SUBDIRS_WINRT = IceUtil\winrt \
Ice\winrt \
Glacier2Lib\winrt \
IceStormLib\winrt \
IceGridLib\winrt
+
!elseif "$(CPP_COMPILER)" == "VC100"
SUBDIRS = IceUtil \
Slice \
@@ -56,8 +58,20 @@ SUBDIRS = IceUtil \
iceserviceinstall
!endif
+!if "$(WINRT)" == "yes"
+$(EVERYTHING)::
+ @for %i in ( $(SUBDIRS) ) do \
+ @if exist %i \
+ @echo "making $@ in %i" && \
+ cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak WINRT=no $@" || exit 1
+ @for %i in ( $(SUBDIRS_WINRT) ) do \
+ @if exist %i \
+ @echo "making $@ in %i" && \
+ cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1
+!else
$(EVERYTHING)::
@for %i in ( $(SUBDIRS) ) do \
@if exist %i \
@echo "making $@ in %i" && \
cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1
+!endif \ No newline at end of file