summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2014-06-12 17:30:13 -0400
committerBernard Normier <bernard@zeroc.com>2014-06-12 17:30:13 -0400
commitc648be7bef08894eb7dc99463eff1c03fc228a2d (patch)
tree6cd3ae427f107823dfeb95d9fa263bb32018f946 /cpp
parentFix ICE-5549: Added write(const char*, bool) to BasicStream (diff)
downloadice-c648be7bef08894eb7dc99463eff1c03fc228a2d.tar.bz2
ice-c648be7bef08894eb7dc99463eff1c03fc228a2d.tar.xz
ice-c648be7bef08894eb7dc99463eff1c03fc228a2d.zip
Windows deprecation fixes
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/IceUtil/DisableWarnings.h4
-rw-r--r--cpp/src/Ice/Service.cpp11
-rw-r--r--cpp/src/IceGrid/PlatformInfo.cpp2
-rw-r--r--cpp/src/IceUtil/FileUtil.cpp2
4 files changed, 4 insertions, 15 deletions
diff --git a/cpp/include/IceUtil/DisableWarnings.h b/cpp/include/IceUtil/DisableWarnings.h
index aec77f4e133..f60b96d52d6 100644
--- a/cpp/include/IceUtil/DisableWarnings.h
+++ b/cpp/include/IceUtil/DisableWarnings.h
@@ -24,8 +24,8 @@
// Microsoft Visual C++
//
#if defined(_MSC_VER)
-# define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated/
-# pragma warning( 4 : 4996 ) // C4996 'std::<function>' was declared deprecated
+# define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated
+# pragma warning( 4 : 4996 ) // C4996 '<function>' was declared deprecated
# pragma warning( 4 : 4800 ) // C4800 forcing value to bool 'true' or 'false' (performance warning)
# if (_MSC_VER < 1700)
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp
index c775c1c6e5f..4fca9da3e36 100644
--- a/cpp/src/Ice/Service.cpp
+++ b/cpp/src/Ice/Service.cpp
@@ -7,7 +7,6 @@
//
// **********************************************************************
-#include <IceUtil/DisableWarnings.h>
#include <IceUtil/CtrlCHandler.h>
#include <IceUtil/StringUtil.h>
#include <IceUtil/Thread.h>
@@ -788,17 +787,7 @@ Ice::Service::name() const
bool
Ice::Service::checkSystem() const
{
-#ifdef _WIN32
- //
- // Check Windows version.
- //
- OSVERSIONINFO ver;
- ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&ver);
- return (ver.dwPlatformId == VER_PLATFORM_WIN32_NT);
-#else
return true;
-#endif
}
#ifdef _WIN32
diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp
index 9cdb3aa073f..1efc51ee4d9 100644
--- a/cpp/src/IceGrid/PlatformInfo.cpp
+++ b/cpp/src/IceGrid/PlatformInfo.cpp
@@ -250,7 +250,7 @@ PlatformInfo::PlatformInfo(const string& prefix,
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
//
-// GetVerionEx deprecated in Windows 8.1
+// GetVersionEx deprecated in Windows 8.1
//
# if defined(_MSC_VER) && _MSC_VER >= 1800
# pragma warning (disable : 4996)
diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp
index 250abf105ea..9413d717fe9 100644
--- a/cpp/src/IceUtil/FileUtil.cpp
+++ b/cpp/src/IceUtil/FileUtil.cpp
@@ -237,7 +237,7 @@ IceUtilInternal::unlink(const string& path)
int
IceUtilInternal::close(int fd)
{
-#ifdef __MINGW32__
+#ifdef _WIN32
return _close(fd);
#else
return ::close(fd);