diff options
author | Adam <Adam@anope.org> | 2010-12-24 01:23:22 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-24 01:23:22 -0500 |
commit | 35e328bcb60a431d9e8ee86c40df571d3653c451 (patch) | |
tree | cf075013366372b1462a254f0923f66bc30dbbca | |
parent | befb4b364418a6e29d5ecb6bcefba565ab324978 (diff) |
Fixed Windows build
-rw-r--r-- | include/commands.h | 2 | ||||
-rw-r--r-- | include/hashcomp.h | 4 | ||||
-rw-r--r-- | include/services.h | 2 | ||||
-rw-r--r-- | include/sockets.h | 2 | ||||
-rw-r--r-- | modules/CMakeLists.txt | 8 | ||||
-rw-r--r-- | modules/core/db_plain.cpp | 6 | ||||
-rw-r--r-- | modules/extra/db_mysql.cpp | 4 | ||||
-rw-r--r-- | modules/extra/m_alias.cpp | 2 | ||||
-rw-r--r-- | src/chanserv.cpp | 4 | ||||
-rw-r--r-- | src/regchannel.cpp | 4 |
10 files changed, 19 insertions, 19 deletions
diff --git a/include/commands.h b/include/commands.h index 6c7ef7494..f05b1a5db 100644 --- a/include/commands.h +++ b/include/commands.h @@ -44,7 +44,7 @@ enum CommandFlag }; /* The source for a command */ -struct CommandSource +struct CoreExport CommandSource { /* User executing the command */ User *u; diff --git a/include/hashcomp.h b/include/hashcomp.h index b99b97aa4..fa502b498 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -176,7 +176,7 @@ namespace irc /** Used to hash irc::strings for unordered_map */ - struct hash + struct CoreExport hash { /* VS 2008 specific code */ enum { bucket_size = 4, min_buckets = 8 }; @@ -253,7 +253,7 @@ namespace ci /** Used to hash ci::strings for unordered_map */ - struct hash + struct CoreExport hash { /* VS 2008 specific code */ enum { bucket_size = 4, min_buckets = 8 }; diff --git a/include/services.h b/include/services.h index d86729e51..5448d9170 100644 --- a/include/services.h +++ b/include/services.h @@ -765,7 +765,7 @@ enum EntryType ENTRYTYPE_HOST }; -class Entry : public Flags<EntryType> +class CoreExport Entry : public Flags<EntryType> { Anope::string mask; diff --git a/include/sockets.h b/include/sockets.h index c9e5bfed0..d5457cf05 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -340,7 +340,7 @@ class CoreExport ConnectionSocket : public BufferedSocket void Connect(const Anope::string &TargetHost, int Port, const Anope::string &BindHost = ""); }; -class ClientSocket : public BufferedSocket +class CoreExport ClientSocket : public BufferedSocket { public: /* Listen socket this connection came from */ diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 9e094b40c..a9a73e775 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -76,9 +76,9 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS}) endif(WIN32) set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}") add_dependencies(${SO} ${PROGRAM_NAME}) - # For Windows only, have the module link to the export library of Anope as well as the wsock32 library (most of the modules probably don't need this, but this is to be on the safe side), also set it's version + # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version if(WIN32) - target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES}) + target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES}) set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") endif(WIN32) # Set the module to be installed to the module directory under the data directory @@ -170,9 +170,9 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS}) add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS}) set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}") add_dependencies(${SO} ${PROGRAM_NAME}) - # For Windows only, have the module link to the export library of Anope as well as the wsock32 library (most of the modules probably don't need this, but this is to be on the safe side), also set it's version + # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version if(WIN32) - target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS}) + target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS}) set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") endif(WIN32) # Set the module to be installed to the module directory under the data directory diff --git a/modules/core/db_plain.cpp b/modules/core/db_plain.cpp index 44058d5e5..97ac75bde 100644 --- a/modules/core/db_plain.cpp +++ b/modules/core/db_plain.cpp @@ -980,7 +980,7 @@ class DBPlain : public Module db << " " << oldmodes; else { - for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) + for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) { const ModeLock &ml = it->second; if (ml.set) @@ -1003,7 +1003,7 @@ class DBPlain : public Module } else { - for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) + for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) { const ModeLock &ml = it->second; if (!ml.set) @@ -1028,7 +1028,7 @@ class DBPlain : public Module } else { - for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) + for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) { const ModeLock &ml = it->second; ChannelMode *cm = ModeManager::FindChannelModeByName(ml.name); diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp index 07135757c..3cc0ceacb 100644 --- a/modules/extra/db_mysql.cpp +++ b/modules/extra/db_mysql.cpp @@ -206,7 +206,7 @@ static Anope::string MakeMLock(ChannelInfo *ci, bool status) ; else { - for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) + for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) { const ModeLock &ml = it->second; if (ml.set == status) @@ -249,7 +249,7 @@ static Anope::string GetMLockParams(ChannelInfo *ci, bool onoff) } else { - for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) + for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) { const ModeLock &ml = it->second; diff --git a/modules/extra/m_alias.cpp b/modules/extra/m_alias.cpp index f1b6c3959..8e73bacd9 100644 --- a/modules/extra/m_alias.cpp +++ b/modules/extra/m_alias.cpp @@ -62,7 +62,7 @@ class ModuleAlias : public Module EventReturn OnPreCommandRun(User *&u, BotInfo *&bi, Anope::string &command, Anope::string &message, ChannelInfo *&ci) { bool fantasy = ci != NULL; - std::map<Anope::string, CommandAlias, std::less<ci::string> >::const_iterator it = aliases.find(command), it_end = it; + std::multimap<Anope::string, CommandAlias, std::less<ci::string> >::const_iterator it = aliases.find(command), it_end = it; if (it_end != aliases.end()) it_end = aliases.upper_bound(command); for (; it != it_end; ++it) diff --git a/src/chanserv.cpp b/src/chanserv.cpp index 504bdea2a..35fd8975c 100644 --- a/src/chanserv.cpp +++ b/src/chanserv.cpp @@ -111,7 +111,7 @@ Anope::string get_mlock_modes(ChannelInfo *ci, int complete) { Anope::string pos = "+", neg = "-", params; - for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) + for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) { const ModeLock &ml = it->second; ChannelMode *cm = ModeManager::FindChannelModeByName(ml.name); @@ -241,7 +241,7 @@ void check_modes(Channel *c) return; } - for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) + for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) { const ModeLock &ml = it->second; ChannelMode *cm = ModeManager::FindChannelModeByName(ml.name); diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 62dc94b3d..17c141ea7 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -579,13 +579,13 @@ void ChannelInfo::LoadMLock() */ bool ChannelInfo::HasMLock(ChannelMode *mode, const Anope::string ¶m, bool status) const { - std::map<ChannelModeName, ModeLock>::const_iterator it = this->mode_locks.find(mode->Name); + std::multimap<ChannelModeName, ModeLock>::const_iterator it = this->mode_locks.find(mode->Name); if (it != this->mode_locks.end()) { if (mode->Type != MODE_REGULAR) { - std::map<ChannelModeName, ModeLock>::const_iterator it_end = this->mode_locks.upper_bound(mode->Name); + std::multimap<ChannelModeName, ModeLock>::const_iterator it_end = this->mode_locks.upper_bound(mode->Name); for (; it != it_end; ++it) { const ModeLock &ml = it->second; |