From 01ce98f2746be837a64f5f9ed2c36eeaabae7462 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 15 Aug 2009 11:32:49 +0000 Subject: win: Last part of support required for VS2010: NEEDS COMPILE TESTING ON: gcc3 (if possible), gcc4, vs2008. - Check for vs2010 in hash_map.h - use unordered_map if it exists - change all map creations to: #if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) // old windows crap #else #if HASHMAP_DEPRECATED // tr1/gcc crap #endif #endif git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11524 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 14 +++++++------- src/modules/m_spanningtree/utils.h | 2 +- src/modules/m_watch.cpp | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index a2b1eab0b..6c0ce82b8 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -60,14 +60,14 @@ void nspace::strlower(char *n) } } -#ifndef WIN32 +#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) + size_t nspace::hash_compare >::operator()(const std::string &s) const +#else #ifdef HASHMAP_DEPRECATED - size_t nspace::insensitive::operator()(const std::string &s) const + size_t CoreExport nspace::insensitive::operator()(const std::string &s) const #else size_t nspace::hash::operator()(const std::string &s) const #endif -#else - size_t nspace::hash_compare >::operator()(const std::string &s) const #endif { /* XXX: NO DATA COPIES! :) @@ -83,10 +83,10 @@ void nspace::strlower(char *n) } -#ifndef WIN32 -size_t nspace::hash::operator()(const irc::string &s) const +#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) + size_t nspace::hash_compare >::operator()(const irc::string &s) const #else -size_t nspace::hash_compare >::operator()(const irc::string &s) const + size_t CoreExport nspace::hash::operator()(const irc::string &s) const #endif { register size_t t = 0; diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 7f95ad8c8..a32b5a445 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -26,7 +26,7 @@ class SpanningTreeUtilities; /* This hash_map holds the hash equivalent of the server * tree, used for rapid linear lookups. */ -#ifdef WINDOWS +#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) typedef nspace::hash_map > > server_hash; #else #ifdef HASHCOMP_DEPRECATED diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index eda1b74a3..e70270424 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -87,10 +87,10 @@ * Before you start screaming, this definition is only used here, so moving it to a header is pointless. * Yes, it's horrid. Blame cl for being different. -- w00t */ -#ifdef WINDOWS -typedef nspace::hash_map, nspace::hash_compare > > watchentries; +#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) + typedef nspace::hash_map, nspace::hash_compare > > watchentries; #else -typedef nspace::hash_map, nspace::hash > watchentries; + typedef nspace::hash_map, nspace::hash > watchentries; #endif typedef std::map watchlist; -- cgit v1.2.3