summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-07-13 00:18:06 +0200
committerJose <jose@zeroc.com>2012-07-13 00:18:06 +0200
commit70802b63320582f0afa8229659ea9fe4a21d02ec (patch)
treeeb455947cc774cc558f96b8d7c78373d2a6f1c2b /cpp/src/IceUtil
parentICE-4839 - Glacier2 sessionHelper IceSSL plug-in (diff)
downloadice-70802b63320582f0afa8229659ea9fe4a21d02ec.tar.bz2
ice-70802b63320582f0afa8229659ea9fe4a21d02ec.tar.xz
ice-70802b63320582f0afa8229659ea9fe4a21d02ec.zip
WinRT support
Diffstat (limited to 'cpp/src/IceUtil')
-rw-r--r--cpp/src/IceUtil/Cond.cpp12
-rw-r--r--cpp/src/IceUtil/CountDownLatch.cpp8
-rw-r--r--cpp/src/IceUtil/FileUtil.cpp17
-rw-r--r--cpp/src/IceUtil/RecMutex.cpp2
-rw-r--r--cpp/src/IceUtil/StringUtil.cpp64
-rw-r--r--cpp/src/IceUtil/Thread.cpp26
-rw-r--r--cpp/src/IceUtil/UUID.cpp24
-rw-r--r--cpp/src/IceUtil/winrt/.depend.mak20
-rw-r--r--cpp/src/IceUtil/winrt/Makefile.mak66
9 files changed, 220 insertions, 19 deletions
diff --git a/cpp/src/IceUtil/Cond.cpp b/cpp/src/IceUtil/Cond.cpp
index 22330c25916..a0f71460f1e 100644
--- a/cpp/src/IceUtil/Cond.cpp
+++ b/cpp/src/IceUtil/Cond.cpp
@@ -17,7 +17,11 @@
IceUtilInternal::Semaphore::Semaphore(long initial)
{
+#ifndef ICE_OS_WINRT
_sem = CreateSemaphore(0, initial, 0x7fffffff, 0);
+#else
+ _sem = CreateSemaphoreExW(0, initial, 0x7fffffff, 0, 0, SEMAPHORE_ALL_ACCESS);
+#endif
if(_sem == INVALID_HANDLE_VALUE)
{
throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
@@ -32,7 +36,11 @@ IceUtilInternal::Semaphore::~Semaphore()
void
IceUtilInternal::Semaphore::wait() const
{
+#ifndef ICE_OS_WINRT
DWORD rc = WaitForSingleObject(_sem, INFINITE);
+#else
+ DWORD rc = WaitForSingleObjectEx(_sem, INFINITE, true);
+#endif
if(rc != WAIT_OBJECT_0)
{
throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
@@ -48,7 +56,11 @@ IceUtilInternal::Semaphore::timedWait(const IceUtil::Time& timeout) const
throw IceUtil::InvalidTimeoutException(__FILE__, __LINE__, timeout);
}
+#ifndef ICE_OS_WINRT
DWORD rc = WaitForSingleObject(_sem, static_cast<DWORD>(msTimeout));
+#else
+ DWORD rc = WaitForSingleObjectEx(_sem, static_cast<DWORD>(msTimeout), true);
+#endif
if(rc != WAIT_TIMEOUT && rc != WAIT_OBJECT_0)
{
throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
diff --git a/cpp/src/IceUtil/CountDownLatch.cpp b/cpp/src/IceUtil/CountDownLatch.cpp
index abc3525f0c9..05e6be3d5df 100644
--- a/cpp/src/IceUtil/CountDownLatch.cpp
+++ b/cpp/src/IceUtil/CountDownLatch.cpp
@@ -19,7 +19,11 @@ IceUtilInternal::CountDownLatch::CountDownLatch(int count) :
}
#ifdef _WIN32
+# ifndef ICE_OS_WINRT
_event = CreateEvent(0, TRUE, FALSE, 0);
+# else
+ _event = CreateEventExW(0, 0, CREATE_EVENT_MANUAL_RESET, SEMAPHORE_ALL_ACCESS);
+# endif
if(_event == 0)
{
throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
@@ -58,7 +62,11 @@ IceUtilInternal::CountDownLatch::await() const
#ifdef _WIN32
while(InterlockedExchangeAdd(&_count, 0) > 0)
{
+# ifndef ICE_OS_WINRT
DWORD rc = WaitForSingleObject(_event, INFINITE);
+# else
+ DWORD rc = WaitForSingleObjectEx(_event, INFINITE, false);
+# endif
assert(rc == WAIT_OBJECT_0 || rc == WAIT_FAILED);
if(rc == WAIT_FAILED)
diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp
index b7fec74f7ea..2ecc670051f 100644
--- a/cpp/src/IceUtil/FileUtil.cpp
+++ b/cpp/src/IceUtil/FileUtil.cpp
@@ -151,6 +151,7 @@ IceUtilInternal::open(const string& path, int flags)
}
}
+#ifndef ICE_OS_WINRT
int
IceUtilInternal::getcwd(string& cwd)
{
@@ -162,6 +163,7 @@ IceUtilInternal::getcwd(string& cwd)
cwd = IceUtil::wstringToString(cwdbuf);
return 0;
}
+#endif
int
IceUtilInternal::unlink(const string& path)
@@ -183,8 +185,15 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) :
_fd(INVALID_HANDLE_VALUE),
_path(path)
{
+#ifndef ICE_OS_WINRT
_fd = ::CreateFileW(IceUtil::stringToWstring(path).c_str(), GENERIC_WRITE, 0, NULL,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+#else
+ CREATEFILE2_EXTENDED_PARAMETERS params;
+ params.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
+ _fd = ::CreateFile2(IceUtil::stringToWstring(path).c_str(), GENERIC_WRITE, 0,
+ OPEN_ALWAYS, &params);
+#endif
_path = path;
if(_fd == INVALID_HANDLE_VALUE)
@@ -192,7 +201,13 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) :
throw IceUtil::FileLockException(__FILE__, __LINE__, GetLastError(), _path);
}
- if(::LockFile(_fd, 0, 0, 0, 0) == 0)
+ OVERLAPPED overlaped;
+ overlaped.Internal = 0;
+ overlaped.InternalHigh = 0;
+ overlaped.Offset = 0;
+ overlaped.OffsetHigh = 0;
+ overlaped.hEvent = nullptr;
+ if(::LockFileEx(_fd, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, 0, 0, &overlaped) == 0)
{
::CloseHandle(_fd);
throw IceUtil::FileLockException(__FILE__, __LINE__, GetLastError(), _path);
diff --git a/cpp/src/IceUtil/RecMutex.cpp b/cpp/src/IceUtil/RecMutex.cpp
index e7d63a374a2..c632f4b7b63 100644
--- a/cpp/src/IceUtil/RecMutex.cpp
+++ b/cpp/src/IceUtil/RecMutex.cpp
@@ -33,7 +33,7 @@ IceUtil::RecMutex::RecMutex(const IceUtil::MutexProtocol protocol) :
void
IceUtil::RecMutex::init(const MutexProtocol)
{
- InitializeCriticalSection(&_mutex);
+ InitializeCriticalSectionEx(&_mutex, 0, 0);
}
IceUtil::RecMutex::~RecMutex()
diff --git a/cpp/src/IceUtil/StringUtil.cpp b/cpp/src/IceUtil/StringUtil.cpp
index 64237c25a41..0be8561f18d 100644
--- a/cpp/src/IceUtil/StringUtil.cpp
+++ b/cpp/src/IceUtil/StringUtil.cpp
@@ -497,31 +497,79 @@ IceUtilInternal::errorToString(int error, LPCVOID source)
{
if(error < WSABASEERR)
{
+#ifndef ICE_OS_WINRT
LPVOID lpMsgBuf = 0;
- DWORD ok = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
+#else
+ int size = 256;
+ auto_ptr<BYTE> lpMsgBuf = auto_ptr<BYTE>(new BYTE[size]);
+#endif
+ DWORD ok = 0;
+#ifdef ICE_OS_WINRT
+ while(true)
+ {
+#endif
+ ok = FormatMessageW(
+#ifndef ICE_OS_WINRT
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+#endif
+ FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS |
(source != NULL ? FORMAT_MESSAGE_FROM_HMODULE : 0),
source,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR)&lpMsgBuf,
+#ifndef ICE_OS_WINRT
+ (LPWSTR)&lpMsgBuf,
+#else
+ (LPWSTR)lpMsgBuf.get(),
+#endif
0,
NULL);
+#ifdef ICE_OS_WINRT
+ if(!ok && size < 65536)
+ {
+ DWORD err = GetLastError();
+ if(err == ERROR_INSUFFICIENT_BUFFER)
+ {
+ size *= 4;
+ size = max(size, 65536);
+ lpMsgBuf = auto_ptr<BYTE>(new BYTE[size]);
+ continue;
+ }
+ }
+ break;
+ }
+#endif
+
if(ok)
{
- LPCTSTR msg = (LPCTSTR)lpMsgBuf;
- assert(msg && strlen((const char*)msg) > 0);
- string result = (const char*)msg;
+#ifndef ICE_OS_WINRT
+ LPWSTR msg = (LPWSTR)lpMsgBuf;
+#else
+ LPWSTR msg = (LPWSTR)lpMsgBuf.get();
+#endif
+ assert(msg && wcslen((const wchar_t*)msg) > 0);
+ wstring result = (const wchar_t*)msg;
if(result[result.length() - 1] == '\n')
{
result = result.substr(0, result.length() - 2);
}
- LocalFree(lpMsgBuf);
- return result;
+#ifndef ICE_OS_WINRT
+ if(lpMsgBuf)
+ {
+ LocalFree(lpMsgBuf);
+ }
+#endif
+ return IceUtil::wstringToString(result);
}
else
{
+#ifndef ICE_OS_WINRT
+ if(lpMsgBuf)
+ {
+ LocalFree(lpMsgBuf);
+ }
+#endif
ostringstream os;
os << "unknown error: " << error;
return os.str();
diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp
index 8e4fd2303a0..a629586a43b 100644
--- a/cpp/src/IceUtil/Thread.cpp
+++ b/cpp/src/IceUtil/Thread.cpp
@@ -63,7 +63,11 @@ IceUtil::ThreadControl::join()
throw BadThreadControlException(__FILE__, __LINE__);
}
+#ifndef ICE_OS_WINRT
DWORD rc = WaitForSingleObject(_handle, INFINITE);
+#else
+ DWORD rc = WaitForSingleObjectEx(_handle, INFINITE, true);
+#endif
if(rc != WAIT_OBJECT_0)
{
throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
@@ -95,7 +99,11 @@ IceUtil::ThreadControl::id() const
void
IceUtil::ThreadControl::sleep(const Time& timeout)
{
+#ifndef ICE_OS_WINRT
Sleep(static_cast<long>(timeout.toMilliSeconds()));
+#else
+ WaitForSingleObjectEx(GetCurrentThread(), static_cast<long>(timeout.toMilliSeconds()), true);
+#endif
}
void
@@ -106,7 +114,11 @@ IceUtil::ThreadControl::yield()
// of its time slice to any other thread of equal priority that is
// ready to run.
//
+#ifndef ICE_OS_WINRT
Sleep(0);
+#else
+ WaitForSingleObjectEx(GetCurrentThread(), 0, true);
+#endif
}
IceUtil::Thread::Thread() :
@@ -172,7 +184,7 @@ WINAPI startHook(void* arg)
#if defined(_MSC_VER) && (_MSC_VER < 1300)
terminate();
#else
- std::terminate();
+ std::terminate();
#endif
}
@@ -220,14 +232,21 @@ IceUtil::Thread::start(size_t stackSize, int priority)
reinterpret_cast<HANDLE>(
_beginthreadex(0,
static_cast<unsigned int>(stackSize),
- startHook, this, CREATE_SUSPENDED, &id));
+ startHook, this,
+#ifndef ICE_OS_WINRT
+ CREATE_SUSPENDED,
+#else
+ 0,
+#endif
+ &id));
_id = id;
-
+ assert(_handle != (HANDLE)-1L);
if(_handle == 0)
{
__decRef();
throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
}
+#ifndef ICE_OS_WINRT
if(SetThreadPriority(_handle, priority) == 0)
{
throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
@@ -237,6 +256,7 @@ IceUtil::Thread::start(size_t stackSize, int priority)
__decRef();
throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
}
+#endif
_started = true;
_running = true;
diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp
index 9fe8f703498..cb2d77a1992 100644
--- a/cpp/src/IceUtil/UUID.cpp
+++ b/cpp/src/IceUtil/UUID.cpp
@@ -14,17 +14,18 @@
// (/dev/random) to generate "version 4" UUIDs, as described in
// http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-00.txt
+#include <IceUtil/Random.h>
+
#ifdef _WIN32
# include <rpc.h>
#else
-# include <IceUtil/Random.h>
# include <sys/types.h>
# include <unistd.h>
#endif
using namespace std;
-#ifndef _WIN32
+#if defined(ICE_OS_WINRT) || !defined(_WIN32)
namespace
{
@@ -45,7 +46,11 @@ public:
PidInitializer()
{
+#ifndef _WIN32
pid_t p = getpid();
+#else
+ int p = GetCurrentProcessId();
+#endif
myPid[0] = (p >> 8) & 0x7F;
myPid[1] = p & 0xFF;
}
@@ -87,15 +92,22 @@ inline void bytesToHex(unsigned char* bytes, size_t len, char*& hexBuffer)
string
IceUtil::generateUUID()
{
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(ICE_OS_WINRT)
UUID uuid;
- UuidCreate(&uuid);
+ RPC_STATUS ret = UuidCreate(&uuid);
+ if(ret != RPC_S_OK && ret != RPC_S_UUID_LOCAL_ONLY && ret != RPC_S_UUID_NO_ADDRESS)
+ {
+ throw new SyscallException(__FILE__, __LINE__, GetLastError());
+ }
unsigned char* str;
- UuidToString(&uuid, &str);
-
+ ret = UuidToString(&uuid, &str);
+ if(ret != RPC_S_OK)
+ {
+ throw new SyscallException(__FILE__, __LINE__, GetLastError());
+ }
string result = reinterpret_cast<char*>(str);
RpcStringFree(&str);
diff --git a/cpp/src/IceUtil/winrt/.depend.mak b/cpp/src/IceUtil/winrt/.depend.mak
new file mode 100644
index 00000000000..eaaf19abe78
--- /dev/null
+++ b/cpp/src/IceUtil/winrt/.depend.mak
@@ -0,0 +1,20 @@
+$(ARCH)\$(CONFIG)\ArgVector$(OBJEXT): ..\ArgVector.cpp "$(includedir)\IceUtil\ArgVector.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\DisableWarnings.h"
+$(ARCH)\$(CONFIG)\Cond$(OBJEXT): ..\Cond.cpp "$(includedir)\IceUtil\Cond.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Time.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Mutex.h" "$(includedir)\IceUtil\Lock.h" "$(includedir)\IceUtil\MutexProtocol.h"
+$(ARCH)\$(CONFIG)\ConvertUTF$(OBJEXT): ..\ConvertUTF.cpp "..\..\IceUtil\ConvertUTF.h" "$(includedir)\IceUtil\Unicode.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Exception.h"
+$(ARCH)\$(CONFIG)\CountDownLatch$(OBJEXT): ..\CountDownLatch.cpp "$(includedir)\IceUtil\CountDownLatch.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Time.h"
+$(ARCH)\$(CONFIG)\Exception$(OBJEXT): ..\Exception.cpp "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\MutexPtrLock.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Time.h" "$(includedir)\IceUtil\Mutex.h" "$(includedir)\IceUtil\Lock.h" "$(includedir)\IceUtil\MutexProtocol.h" "$(includedir)\IceUtil\StringUtil.h"
+$(ARCH)\$(CONFIG)\FileUtil$(OBJEXT): ..\FileUtil.cpp "$(includedir)\IceUtil\DisableWarnings.h" "$(includedir)\IceUtil\FileUtil.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Shared.h" "$(includedir)\IceUtil\Handle.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Unicode.h"
+$(ARCH)\$(CONFIG)\InputUtil$(OBJEXT): ..\InputUtil.cpp "$(includedir)\IceUtil\InputUtil.h" "$(includedir)\IceUtil\Config.h"
+$(ARCH)\$(CONFIG)\Options$(OBJEXT): ..\Options.cpp "$(includedir)\IceUtil\Options.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\RecMutex.h" "$(includedir)\IceUtil\Lock.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Time.h" "$(includedir)\IceUtil\MutexProtocol.h" "$(includedir)\IceUtil\Shared.h" "$(includedir)\IceUtil\Handle.h" "$(includedir)\IceUtil\StringUtil.h"
+$(ARCH)\$(CONFIG)\OutputUtil$(OBJEXT): ..\OutputUtil.cpp "$(includedir)\IceUtil\OutputUtil.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\FileUtil.h" "$(includedir)\IceUtil\Shared.h" "$(includedir)\IceUtil\Handle.h" "$(includedir)\IceUtil\Exception.h"
+$(ARCH)\$(CONFIG)\Random$(OBJEXT): ..\Random.cpp "$(includedir)\IceUtil\Random.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Mutex.h" "$(includedir)\IceUtil\Lock.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Time.h" "$(includedir)\IceUtil\MutexProtocol.h" "$(includedir)\IceUtil\MutexPtrLock.h"
+$(ARCH)\$(CONFIG)\RecMutex$(OBJEXT): ..\RecMutex.cpp "$(includedir)\IceUtil\RecMutex.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Lock.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Time.h" "$(includedir)\IceUtil\MutexProtocol.h"
+$(ARCH)\$(CONFIG)\Shared$(OBJEXT): ..\Shared.cpp "$(includedir)\IceUtil\Shared.h" "$(includedir)\IceUtil\Config.h"
+$(ARCH)\$(CONFIG)\StringUtil$(OBJEXT): ..\StringUtil.cpp "$(includedir)\IceUtil\StringUtil.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Unicode.h" "$(includedir)\IceUtil\Exception.h"
+$(ARCH)\$(CONFIG)\Thread$(OBJEXT): ..\Thread.cpp "$(includedir)\IceUtil\Thread.h" "$(includedir)\IceUtil\Shared.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Handle.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Mutex.h" "$(includedir)\IceUtil\Lock.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Time.h" "$(includedir)\IceUtil\MutexProtocol.h"
+$(ARCH)\$(CONFIG)\ThreadException$(OBJEXT): ..\ThreadException.cpp "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Time.h"
+$(ARCH)\$(CONFIG)\Time$(OBJEXT): ..\Time.cpp "$(includedir)\IceUtil\DisableWarnings.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Time.h"
+$(ARCH)\$(CONFIG)\Timer$(OBJEXT): ..\Timer.cpp "$(includedir)\IceUtil\Timer.h" "$(includedir)\IceUtil\Shared.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Thread.h" "$(includedir)\IceUtil\Handle.h" "$(includedir)\IceUtil\Exception.h" "$(includedir)\IceUtil\Mutex.h" "$(includedir)\IceUtil\Lock.h" "$(includedir)\IceUtil\ThreadException.h" "$(includedir)\IceUtil\Time.h" "$(includedir)\IceUtil\MutexProtocol.h" "$(includedir)\IceUtil\Monitor.h" "$(includedir)\IceUtil\Cond.h"
+$(ARCH)\$(CONFIG)\UUID$(OBJEXT): ..\UUID.cpp "$(includedir)\IceUtil\UUID.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Random.h" "$(includedir)\IceUtil\Exception.h"
+$(ARCH)\$(CONFIG)\Unicode$(OBJEXT): ..\Unicode.cpp "$(includedir)\IceUtil\Unicode.h" "$(includedir)\IceUtil\Config.h" "$(includedir)\IceUtil\Exception.h" "..\..\IceUtil\ConvertUTF.h"
+$(ARCH)\$(CONFIG)\MutexProtocol$(OBJEXT): ..\MutexProtocol.cpp "$(includedir)\IceUtil\MutexProtocol.h" "$(includedir)\IceUtil\Config.h"
diff --git a/cpp/src/IceUtil/winrt/Makefile.mak b/cpp/src/IceUtil/winrt/Makefile.mak
new file mode 100644
index 00000000000..abfbd31bcbc
--- /dev/null
+++ b/cpp/src/IceUtil/winrt/Makefile.mak
@@ -0,0 +1,66 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..\..\..
+LIBNAME = $(SDK_LIBRARY_PATH)\iceutil.lib
+TARGETS = $(LIBNAME)
+SOURCE_DIR = ..
+
+TARGETS = $(LIBNAME)
+
+OBJS = $(ARCH)\$(CONFIG)\ArgVector.obj \
+ $(ARCH)\$(CONFIG)\Cond.obj \
+ $(ARCH)\$(CONFIG)\ConvertUTF.obj \
+ $(ARCH)\$(CONFIG)\CountDownLatch.obj \
+ $(ARCH)\$(CONFIG)\Exception.obj \
+ $(ARCH)\$(CONFIG)\FileUtil.obj \
+ $(ARCH)\$(CONFIG)\InputUtil.obj \
+ $(ARCH)\$(CONFIG)\Options.obj \
+ $(ARCH)\$(CONFIG)\OutputUtil.obj \
+ $(ARCH)\$(CONFIG)\Random.obj \
+ $(ARCH)\$(CONFIG)\RecMutex.obj \
+ $(ARCH)\$(CONFIG)\Shared.obj \
+ $(ARCH)\$(CONFIG)\StringUtil.obj \
+ $(ARCH)\$(CONFIG)\Thread.obj \
+ $(ARCH)\$(CONFIG)\ThreadException.obj \
+ $(ARCH)\$(CONFIG)\Time.obj \
+ $(ARCH)\$(CONFIG)\Timer.obj \
+ $(ARCH)\$(CONFIG)\UUID.obj \
+ $(ARCH)\$(CONFIG)\Unicode.obj \
+ $(ARCH)\$(CONFIG)\MutexProtocol.obj
+
+SRCS = $(OBJS:.obj=.cpp)
+SRCS = $(SRCS:x86\=)
+SRCS = $(SRCS:x64\=)
+SRCS = $(SRCS:Retail\=..\)
+SRCS = $(SRCS:Debug\=..\)
+
+CPPFLAGS = $(CPPFLAGS) -DICE_UTIL_API_EXPORTS -I..\.. -DWIN32_LEAN_AND_MEAN
+
+!include $(top_srcdir)/config/Make.rules.mak
+
+depend::
+ del /q .depend.mak
+
+.cpp.depend:
+ $(CXX) /Fo$(ARCH)\$(CONFIG)\ /Fd$(ARCH)\$(CONFIG)\ /Zs /showIncludes $(CXXFLAGS) $(CPPFLAGS) $< 2>&1 | python.exe $(ice_dir)/config/makedepend-winrt.py $<
+
+depend:: $(ARCH)\$(CONFIG) $(SRCS_DEPEND)
+
+RES_FILE = $(SOURCE_DIR)\IceUtil.res
+
+$(LIBNAME): $(OBJS) $(RES_FILE) sdks
+ $(AR) $(ARFLAGS) $(OBJS) /out:$(LIBNAME)
+
+clean::
+ -del /q $(ARCH)\$(CONFIG)\*.obj
+ -del /q $(ARCH)\$(CONFIG)\*.pdb
+ -del /q $(RES_FILE)
+
+!include .depend.mak