diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-07-24 18:50:20 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-07-24 18:50:20 -0400 |
commit | 2afc67db3fa6f87538bb927b9621a351948883a4 (patch) | |
tree | 4324c78515e48615e082658d80fef0a0638f162c /cpp | |
parent | Completed fix for ICE-5567: move various C++11 classes/functions out of line (diff) | |
download | ice-2afc67db3fa6f87538bb927b9621a351948883a4.tar.bz2 ice-2afc67db3fa6f87538bb927b9621a351948883a4.tar.xz ice-2afc67db3fa6f87538bb927b9621a351948883a4.zip |
Build fixes for MinGW 4.7.2-32
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/Make.rules | 2 | ||||
-rw-r--r-- | cpp/config/Make.rules.MINGW | 3 | ||||
-rw-r--r-- | cpp/src/Ice/Network.cpp | 16 | ||||
-rw-r--r-- | cpp/src/IceUtil/OutputUtil.cpp | 7 | ||||
-rw-r--r-- | cpp/src/IceUtil/Random.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceUtil/StringConverter.cpp | 13 |
6 files changed, 32 insertions, 13 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index 54fa9d6c81a..b67fa8e0ca5 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -125,7 +125,7 @@ USE_READLINE ?= no # environment variables, change the following setting to reflect the # installation location. # -THIRDPARTY_HOME ?= "C:\Program Files\ZeroC\Ice-$(VERSION)-ThirdParty" +THIRDPARTY_HOME ?= C:\Program Files (x86)\ZeroC\Ice-$(VERSION)-ThirdParty # # Default Mutex protocol: one of PrioNone or PrioInherit. diff --git a/cpp/config/Make.rules.MINGW b/cpp/config/Make.rules.MINGW index cad028a2d2c..31858602708 100644 --- a/cpp/config/Make.rules.MINGW +++ b/cpp/config/Make.rules.MINGW @@ -73,7 +73,8 @@ BZIP2_LIBS = -lbzip2$(COMPSUFFIX) BASELIBS = -liceutil$(SOVERSION)$(COMPSUFFIX) LIBS = -lice$(SOVERSION)$(COMPSUFFIX) $(BASELIBS) -ICESSL_LIBS = -licessl$(SOVERSION)$(COMPSUFFIX) $(LIBS) +ICESSL_LIBS = -licessl$(SOVERSION)$(COMPSUFFIX) +ICEWS_LIBS = -licews$(SOVERSION)$(COMPSUFFIX) SLICE_LIBS = -lslice$(SOVERSION)$(COMPSUFFIX) $(BASELIBS) ICEUTIL_OS_LIBS = -lrpcrt4 -ladvapi32 diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index f8f3b2e96b8..880c66e8ce3 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -22,10 +22,7 @@ // some definitions. // #if defined(__MINGW32__) -# define _WIN32_WINNT 0x0501 -# ifndef IPV6_V6ONLY -# define IPV6_V6ONLY 27 -# endif +#define _WIN32_WINNT 0x0600 #endif #include <IceUtil/DisableWarnings.h> @@ -57,6 +54,17 @@ # include <sys/sockio.h> #endif +#if defined(__MINGW32__) +# ifndef IPV6_V6ONLY +# define IPV6_V6ONLY 27 +# endif + +extern "C" +{ + WINSOCK_API_LINKAGE int WSAAPI inet_pton(INT, PCTSTR, PVOID); +} +#endif + using namespace std; using namespace Ice; using namespace IceInternal; diff --git a/cpp/src/IceUtil/OutputUtil.cpp b/cpp/src/IceUtil/OutputUtil.cpp index e1fe349cf61..9475a80c143 100644 --- a/cpp/src/IceUtil/OutputUtil.cpp +++ b/cpp/src/IceUtil/OutputUtil.cpp @@ -34,12 +34,9 @@ string IceUtilInternal::int64ToString(Int64 val) { char buf[64]; -#ifdef _WIN32 -# if defined(_MSC_VER) + +#if defined(_WIN32) sprintf_s(buf, sizeof(buf), "%I64d", val); -# else - sprintf(buf, "%I64d", val); -# endif #elif defined(ICE_64) sprintf(buf, "%ld", val); // Avoids a format warning from GCC. #else diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp index 68c125ebb25..1df50d27855 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/IceUtil/Random.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -#ifdef _MSC_VER +#ifdef _WIN32 # define _CRT_RAND_S #endif @@ -151,7 +151,7 @@ unsigned int IceUtilInternal::random(int limit) { unsigned int r; -#if defined(_MSC_VER) +#ifdef _WIN32 errno_t err = rand_s(&r); if(err != 0) { diff --git a/cpp/src/IceUtil/StringConverter.cpp b/cpp/src/IceUtil/StringConverter.cpp index 1a6fe6e8405..19095c52a45 100644 --- a/cpp/src/IceUtil/StringConverter.cpp +++ b/cpp/src/IceUtil/StringConverter.cpp @@ -1,3 +1,16 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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. +// +// ********************************************************************** + +#if defined(__MINGW32__) && !defined(_WIN32_WINNT) + // Windows Vista and up for WC_ERR_INVALID_CHARS + #define _WIN32_WINNT 0x0600 +#endif #include <IceUtil/StringConverter.h> #include <IceUtil/MutexPtrLock.h> |