summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2014-08-21 14:06:19 -0230
committerDwayne Boone <dwayne@zeroc.com>2014-08-21 14:06:19 -0230
commit3748eebcad51c8dded194fdc9d998ca0c33218c3 (patch)
tree3e7c4cbbbe24549af2302016c2549181e28f9d96 /cpp/src
parentRemoved some unecessary initialization of class members (diff)
downloadice-3748eebcad51c8dded194fdc9d998ca0c33218c3.tar.bz2
ice-3748eebcad51c8dded194fdc9d998ca0c33218c3.tar.xz
ice-3748eebcad51c8dded194fdc9d998ca0c33218c3.zip
Fixed WINRT build
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/winrt/Makefile.mak6
-rw-r--r--cpp/src/IceUtil/SHA1.cpp11
2 files changed, 11 insertions, 6 deletions
diff --git a/cpp/src/Ice/winrt/Makefile.mak b/cpp/src/Ice/winrt/Makefile.mak
index 1b6404252dd..1ad9e5b6e10 100644
--- a/cpp/src/Ice/winrt/Makefile.mak
+++ b/cpp/src/Ice/winrt/Makefile.mak
@@ -54,6 +54,7 @@ OBJS = $(ARCH)\$(CONFIG)\Acceptor.obj \
$(ARCH)\$(CONFIG)\LocalObject.obj \
$(ARCH)\$(CONFIG)\LocatorInfo.obj \
$(ARCH)\$(CONFIG)\Locator.obj \
+ $(ARCH)\$(CONFIG)\LoggerAdminI.obj \
$(ARCH)\$(CONFIG)\LoggerI.obj \
$(ARCH)\$(CONFIG)\Logger.obj \
$(ARCH)\$(CONFIG)\LoggerUtil.obj \
@@ -89,6 +90,7 @@ OBJS = $(ARCH)\$(CONFIG)\Acceptor.obj \
$(ARCH)\$(CONFIG)\Proxy.obj \
$(ARCH)\$(CONFIG)\ReferenceFactory.obj \
$(ARCH)\$(CONFIG)\Reference.obj \
+ $(ARCH)\$(CONFIG)\RemoteLogger.obj \
$(ARCH)\$(CONFIG)\RetryQueue.obj \
$(ARCH)\$(CONFIG)\RequestHandler.obj \
$(ARCH)\$(CONFIG)\ResponseHandler.obj \
@@ -152,8 +154,9 @@ SLICE_CORE_SRCS = $(slicedir)\Ice\BuiltinSequences.ice \
$(slicedir)\Ice\PropertiesF.ice \
$(slicedir)\Ice\Properties.ice \
$(slicedir)\Ice\PropertiesAdmin.ice \
- $(slicedir)\Ice\RouterF.ice \
+ $(slicedir)\Ice\RemoteLogger.ice \
$(slicedir)\Ice\Router.ice \
+ $(slicedir)\Ice\RouterF.ice \
$(slicedir)\Ice\ServantLocatorF.ice \
$(slicedir)\Ice\ServantLocator.ice \
$(slicedir)\Ice\SliceChecksumDict.ice \
@@ -274,6 +277,7 @@ clean::
-del /q $(SOURCE_DIR)\Process.cpp $(HDIR)\Process.h
-del /q $(SOURCE_DIR)\PropertiesF.cpp $(HDIR)\PropertiesF.h
-del /q $(SOURCE_DIR)\Properties.cpp $(HDIR)\Properties.h
+ -del /q $(SOURCE_DIR)\RemoteLogger.cpp $(HDIR)\RemoteLogger.h
-del /q $(SOURCE_DIR)\RouterF.cpp $(HDIR)\RouterF.h
-del /q $(SOURCE_DIR)\Router.cpp $(HDIR)\Router.h
-del /q $(SOURCE_DIR)\ServantLocatorF.cpp $(HDIR)\ServantLocatorF.h
diff --git a/cpp/src/IceUtil/SHA1.cpp b/cpp/src/IceUtil/SHA1.cpp
index 31a5e459fad..cfa9d70040b 100644
--- a/cpp/src/IceUtil/SHA1.cpp
+++ b/cpp/src/IceUtil/SHA1.cpp
@@ -32,8 +32,8 @@ IceUtil::SHA1::SHA1() :
{
throw IceUtil::SyscallException(__FILE__, __LINE__, GetLastError());
}
-
- if(!CryptCreateHash(_ctx, CALG_SHA1, 0, 0, &_hash))
+
+ if(!CryptCreateHash(_ctx, CALG_SHA1, 0, 0, &_hash))
{
throw IceUtil::SyscallException(__FILE__, __LINE__, GetLastError());
}
@@ -45,7 +45,7 @@ IceUtil::SHA1::~SHA1()
{
CryptDestroyHash(_hash);
}
-
+
if(_ctx)
{
CryptReleaseContext(_ctx, 0);
@@ -67,7 +67,7 @@ void
IceUtil::SHA1::update(const unsigned char* data, size_t length)
{
# if defined(_WIN32)
- if(!CryptHashData(_hash, data, static_cast<DWORD>(length), 0))
+ if(!CryptHashData(_hash, data, static_cast<DWORD>(length), 0))
{
throw IceUtil::SyscallException(__FILE__, __LINE__, GetLastError());
}
@@ -102,7 +102,8 @@ void
IceUtil::sha1(const unsigned char* data, size_t length, vector<unsigned char>& md)
{
#if defined(ICE_OS_WINRT)
- auto dataA = ref new Platform::Array<unsigned char>(const_cast<unsigned char*>(data), length);
+ auto dataA =
+ ref new Platform::Array<unsigned char>(const_cast<unsigned char*>(data), static_cast<unsigned int>(length));
auto hasher = Windows::Security::Cryptography::Core::HashAlgorithmProvider::OpenAlgorithm("SHA1");
auto hashed = hasher->HashData(Windows::Security::Cryptography::CryptographicBuffer::CreateFromByteArray(dataA));
auto reader = ::Windows::Storage::Streams::DataReader::FromBuffer(hashed);