summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Config.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/IceUtil/Config.h')
-rw-r--r--cpp/include/IceUtil/Config.h44
1 files changed, 19 insertions, 25 deletions
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index 33191fb13f6..2fb166f0e72 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -34,13 +34,7 @@
//
// 32 or 64 bit mode?
//
-#if defined(__linux) && defined(__sparc__)
-//
-// We are a linux sparc, which forces 32 bit usr land, no matter
-// the architecture
-//
-# define ICE_32
-#elif defined(__sun) && (defined(__sparcv9) || defined(__x86_64)) || \
+#if defined(__sun) && (defined(__sparcv9) || defined(__x86_64)) || \
defined(__linux) && defined(__x86_64) || \
defined(__hppa) && defined(__LP64__) || \
defined(_ARCH_COM) && defined(__64BIT__) || \
@@ -51,19 +45,28 @@
# define ICE_32
#endif
-#if defined(_MSC_VER) && _MSC_VER > 1600
+#if defined(_MSC_VER) && (_MSC_VER >= 1700)
+//
+// Visual Studio 2012 and later
+//
# include <winapifamily.h>
-# if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP
+# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
# define ICE_OS_WINRT
# define ICE_STATIC_LIBS
# endif
+//
+// Windows provides native condition variables on Vista and later,
+// and Visual Studio 2012 no longer supports Windows XP or Windows Server 2003.
+//
+// You can also "switch-on" this macro to use native condition variables with
+// other C++ compilers on Windows.
+//
+# define ICE_HAS_WIN32_CONDVAR
#endif
//
// Compiler extensions to export and import symbols: see the documentation
-// for Visual C++, Sun ONE Studio 8 and HP aC++.
-//
-// TODO: more macros to support IBM Visual Age _Export syntax as well.
+// for Visual C++, Solaris Studio and HP aC++.
//
#if (defined(_MSC_VER) && !defined(ICE_STATIC_LIBS)) || \
(defined(__HP_aCC) && defined(__HP_WINDLL))
@@ -94,12 +97,8 @@
# define ICE_UTIL_API ICE_DECLSPEC_IMPORT
#endif
-#if defined(_WIN32)
-# ifndef _WIN32_WINNT
-# elif _WIN32_WINNT < 0x0400
-# error "TryEnterCricalSection requires _WIN32_WINNT >= 0x0400"
-# endif
+#ifdef _WIN32
# if !defined(ICE_STATIC_LIBS) && defined(_MSC_VER) && (!defined(_DLL) || !defined(_MT))
# error "Only multi-threaded DLL libraries can be used with Ice!"
@@ -137,17 +136,12 @@
# include <errno.h>
#endif
-//
-// By deriving from this class, other classes are made non-copyable.
-//
+
namespace IceUtil
{
//
-// TODO: Constructor and destructor should not be inlined, as they are
-// not performance critical.
-//
-// TODO: Naming conventions?
+// By deriving from this class, other classes are made non-copyable.
//
class noncopyable
{
@@ -168,7 +162,7 @@ private:
//
#ifdef _MSC_VER
//
-// On Windows, long is always 32-bit
+// With Visual C++, long is always 32-bit
//
typedef __int64 Int64;
#elif defined(ICE_64)