From 8bad664ccedc6b6785d798227cc169da29cdf67c Mon Sep 17 00:00:00 2001 From: cherierm Date: Thu, 25 Oct 2007 11:55:34 +0000 Subject: [PATCH] The configuration file visualc.h is change to declare the _WIN32_WINNT macro before the inclusion of the windows.h header (this permits to use the TryEnterCriticalSection() only available if the previous macro is more or equals to 0x400). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4865 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/win32/compiler/visualc.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/win32/compiler/visualc.h b/src/win32/compiler/visualc.h index 0bc76eaf49..27cce6cf8b 100644 --- a/src/win32/compiler/visualc.h +++ b/src/win32/compiler/visualc.h @@ -14,6 +14,15 @@ #include +#ifdef _WIN32_WINNT + #if _WIN32_WINNT < 0x0400 + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 + #endif +#else + #define _WIN32_WINNT 0x0400 +#endif + /* * include files. */ @@ -412,14 +421,6 @@ the double. For now, GRAS requires the structures to be compacted. */ #define S_IWUSR _S_IWRITE #define S_IRUSR _S_IREAD -#ifdef _WIN32_WINNT - #if _WIN32_WINNT < 0x0400 - #undef _WIN32_WINNT - #define _WIN32_WINNT 0x0400 - #endif -#else - #define _WIN32_WINNT 0x0400 -#endif /* Visual C++ does not declare the ssize_t type */ typedef int ssize_t; @@ -430,4 +431,5 @@ typedef unsigned int mode_t; /* Visual C++ does not declare the uint32_t type */ typedef unsigned int uint32_t; + #endif /* #ifndef __XBT_VISUALC_COMPILER_CONFIG_H__ */ -- 2.20.1