From e9095568836e376a4e6fab17c1d219c04c51e118 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 26 May 2011 16:18:38 +0200 Subject: [PATCH] Changed: #1177 VS 2010 does not work under CMake --- code/nel/include/nel/misc/debug.h | 6 +++--- code/nel/include/nel/misc/smart_ptr.h | 2 +- code/nel/include/nel/misc/types_nl.h | 18 +++++++++--------- code/nel/src/3d/fasthls_modifier.cpp | 4 ++-- code/nel/src/net/sock.cpp | 4 +--- code/nel/src/net/tcp_sock.cpp | 4 +--- .../misc/extract_filename/extract_filename.cpp | 2 +- .../common/src/game_share/character_sync_itf.h | 4 +--- .../common/src/game_share/msg_ais_egs_gen.h | 4 +--- .../common/src/game_share/r2_modules_itf.h | 4 +--- .../ryzom/common/src/game_share/r2_share_itf.h | 4 +--- .../guild_manager/guild_unifier_itf.h | 4 +--- .../src/server_share/login_service_itf.h | 4 +--- .../shard_unifier_service/database_mapping.h | 4 +--- .../nel_database_mapping.h | 4 +--- 15 files changed, 26 insertions(+), 46 deletions(-) diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 91f9d9c43..af92c4a16 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -169,7 +169,7 @@ void setCrashAlreadyReported(bool state); *\endcode */ #ifdef NL_NO_DEBUG -# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # define nldebug __noop # else # define nldebug 0&& @@ -184,7 +184,7 @@ void setCrashAlreadyReported(bool state); * Same as nldebug but it will be display in debug and in release mode. */ #ifdef NL_NO_DEBUG -# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # define nlinfo __noop # else # define nlinfo 0&& @@ -212,7 +212,7 @@ void setCrashAlreadyReported(bool state); */ #ifdef NL_NO_DEBUG -# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # define nlwarning __noop # else # define nlwarning 0&& diff --git a/code/nel/include/nel/misc/smart_ptr.h b/code/nel/include/nel/misc/smart_ptr.h index 50fbf4a4a..81b5c0e75 100644 --- a/code/nel/include/nel/misc/smart_ptr.h +++ b/code/nel/include/nel/misc/smart_ptr.h @@ -352,7 +352,7 @@ public: } }; -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) // This operator only purpose is to compare with NULL value template diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index de86c7659..08db88924 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -51,14 +51,10 @@ # ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0500 // Minimal OS = Windows 2000 (NeL is not supported on Windows 95/98) # endif -# if _MSC_VER >= 1500 +# if _MSC_VER >= 1600 +# define NL_COMP_VC10 +# elif _MSC_VER >= 1500 # define NL_COMP_VC9 -# ifndef _STLPORT_VERSION // STLport doesn't depend on MS STL features -# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack -# define NL_ISO_STDTR1_AVAILABLE -# define NL_ISO_STDTR1_HEADER(header)
-# endif -# endif # elif _MSC_VER >= 1400 # define NL_COMP_VC8 # undef nl_time @@ -79,6 +75,10 @@ # define NL_COMP_VC6 # define NL_COMP_NEED_PARAM_ON_METHOD # endif +# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack or later +# define NL_ISO_STDTR1_AVAILABLE +# define NL_ISO_STDTR1_HEADER(header)
+# endif # ifdef _DEBUG # define NL_DEBUG # elif defined (NDEBUG) @@ -153,7 +153,7 @@ # pragma warning (disable : 4390) // don't warn in empty block "if(exp) ;" # pragma warning (disable : 4996) // 'vsnprintf': This function or variable may be unsafe. Consider using vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. // Debug : Sept 01 2006 -# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # pragma warning (disable : 4005) // don't warn on redefinitions caused by xp platform sdk # endif // NL_COMP_VC8 || NL_COMP_VC9 #endif // NL_OS_WINDOWS @@ -366,7 +366,7 @@ typedef uint16 ucchar; // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) #ifdef NL_OS_WINDOWS -# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # define INT64_CONSTANT(c) (c##LL) # define SINT64_CONSTANT(c) (c##LL) # define UINT64_CONSTANT(c) (c##LL) diff --git a/code/nel/src/3d/fasthls_modifier.cpp b/code/nel/src/3d/fasthls_modifier.cpp index 6f90e574a..fb3fdd31d 100644 --- a/code/nel/src/3d/fasthls_modifier.cpp +++ b/code/nel/src/3d/fasthls_modifier.cpp @@ -109,7 +109,7 @@ CRGBA CFastHLSModifier::convert(uint H, uint L, uint S) return col; } -#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # pragma warning( push ) # pragma warning( disable : 4799 ) #endif @@ -262,7 +262,7 @@ uint16 CFastHLSModifier::applyHLSMod(uint16 colorIn, uint8 dHue, uint dLum, uin #pragma managed(pop) #endif -#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # pragma warning( pop ) #endif diff --git a/code/nel/src/net/sock.cpp b/code/nel/src/net/sock.cpp index 475548821..e2a0c4205 100644 --- a/code/nel/src/net/sock.cpp +++ b/code/nel/src/net/sock.cpp @@ -22,10 +22,8 @@ #include "nel/misc/hierarchical_timer.h" #ifdef NL_OS_WINDOWS -# if defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -# endif # define NOMINMAX +# include # include # define socklen_t int # define ERROR_NUM WSAGetLastError() diff --git a/code/nel/src/net/tcp_sock.cpp b/code/nel/src/net/tcp_sock.cpp index d51281db6..9773e0b00 100644 --- a/code/nel/src/net/tcp_sock.cpp +++ b/code/nel/src/net/tcp_sock.cpp @@ -20,9 +20,7 @@ #include "nel/net/net_log.h" #ifdef NL_OS_WINDOWS -# if defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -# endif +# include # define NOMINMAX # include # define socklen_t int diff --git a/code/nel/tools/misc/extract_filename/extract_filename.cpp b/code/nel/tools/misc/extract_filename/extract_filename.cpp index c8ca13452..39fead0e4 100644 --- a/code/nel/tools/misc/extract_filename/extract_filename.cpp +++ b/code/nel/tools/misc/extract_filename/extract_filename.cpp @@ -23,7 +23,7 @@ using namespace NLMISC; #ifdef NL_DEBUG #define INFO nlinfo #else // NL_DEBUG -# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) # define INFO __noop # else # define INFO 0&& diff --git a/code/ryzom/common/src/game_share/character_sync_itf.h b/code/ryzom/common/src/game_share/character_sync_itf.h index 728104322..840dd2845 100644 --- a/code/ryzom/common/src/game_share/character_sync_itf.h +++ b/code/ryzom/common/src/game_share/character_sync_itf.h @@ -21,9 +21,7 @@ #ifndef CHARACTER_SYNC_ITF #define CHARACTER_SYNC_ITF #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" diff --git a/code/ryzom/common/src/game_share/msg_ais_egs_gen.h b/code/ryzom/common/src/game_share/msg_ais_egs_gen.h index 99de7c001..d7bfc39e7 100644 --- a/code/ryzom/common/src/game_share/msg_ais_egs_gen.h +++ b/code/ryzom/common/src/game_share/msg_ais_egs_gen.h @@ -21,9 +21,7 @@ #ifndef MSG_AIS_EGS_GEN #define MSG_AIS_EGS_GEN #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" diff --git a/code/ryzom/common/src/game_share/r2_modules_itf.h b/code/ryzom/common/src/game_share/r2_modules_itf.h index e8626cafd..d44f0ea5a 100644 --- a/code/ryzom/common/src/game_share/r2_modules_itf.h +++ b/code/ryzom/common/src/game_share/r2_modules_itf.h @@ -21,9 +21,7 @@ #ifndef R2_MODULES_ITF #define R2_MODULES_ITF #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" diff --git a/code/ryzom/common/src/game_share/r2_share_itf.h b/code/ryzom/common/src/game_share/r2_share_itf.h index 0d2956089..4e2abdf10 100644 --- a/code/ryzom/common/src/game_share/r2_share_itf.h +++ b/code/ryzom/common/src/game_share/r2_share_itf.h @@ -21,9 +21,7 @@ #ifndef R2_SHARE_ITF #define R2_SHARE_ITF #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild_unifier_itf.h b/code/ryzom/server/src/entities_game_service/guild_manager/guild_unifier_itf.h index 663497b62..1280fe6c2 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild_unifier_itf.h +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild_unifier_itf.h @@ -21,9 +21,7 @@ #ifndef GUILD_UNIFIER_ITF #define GUILD_UNIFIER_ITF #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" diff --git a/code/ryzom/server/src/server_share/login_service_itf.h b/code/ryzom/server/src/server_share/login_service_itf.h index 3095b5d3b..bac7e2105 100644 --- a/code/ryzom/server/src/server_share/login_service_itf.h +++ b/code/ryzom/server/src/server_share/login_service_itf.h @@ -21,9 +21,7 @@ #ifndef LOGIN_SERVICE_ITF #define LOGIN_SERVICE_ITF #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" diff --git a/code/ryzom/server/src/shard_unifier_service/database_mapping.h b/code/ryzom/server/src/shard_unifier_service/database_mapping.h index 19503aa8e..d6f9b8689 100644 --- a/code/ryzom/server/src/shard_unifier_service/database_mapping.h +++ b/code/ryzom/server/src/shard_unifier_service/database_mapping.h @@ -21,9 +21,7 @@ #ifndef DATABASE_MAPPING #define DATABASE_MAPPING #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" diff --git a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h index baae9bc4f..4081db824 100644 --- a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h +++ b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h @@ -21,9 +21,7 @@ #ifndef NEL_DATABASE_MAPPING #define NEL_DATABASE_MAPPING #include "nel/misc/types_nl.h" -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) -# include -#endif +#include #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h"