From be8d29f50a9d0d6c1fb94626b32b9db1c320c514 Mon Sep 17 00:00:00 2001 From: abv Date: Thu, 13 Mar 2014 09:15:46 +0400 Subject: [PATCH] 0024718: Broken build on VC8 (VS 2005) if TBB is used Macro _WIN32_WINNT defined in OpenGl_SceneGeometry.cxx for building with TBB on VS 2005 --- src/OpenGl/OpenGl_SceneGeometry.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/OpenGl/OpenGl_SceneGeometry.cxx b/src/OpenGl/OpenGl_SceneGeometry.cxx index aca6a47438..05f83ca43e 100755 --- a/src/OpenGl/OpenGl_SceneGeometry.cxx +++ b/src/OpenGl/OpenGl_SceneGeometry.cxx @@ -22,6 +22,14 @@ #include #ifdef HAVE_TBB + // On Windows, function TryEnterCriticalSection has appeared in Windows NT + // and is surrounded by #ifdef in MS VC++ 7.1 headers. + // Thus to use it we need to define appropriate macro saying that we wil + // run on Windows NT 4.0 at least + #if ((defined(_WIN32) || defined(__WIN32__)) && !defined(_WIN32_WINNT)) + #define _WIN32_WINNT 0x0501 + #endif + #include #endif