diff options
author | Adam <Adam@anope.org> | 2011-04-08 03:48:43 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-04-10 17:54:20 -0400 |
commit | b56565eac2d7207c88c53054cb1096519ec7fba9 (patch) | |
tree | cd0f10a47dd002157553d96e2ef91ea5d620eadc /src | |
parent | f8588b112fe6ef1095e40fcd64f85e670d96bc92 (diff) |
Fixed Windows build on VS 2010
Diffstat (limited to 'src')
-rw-r--r-- | src/hashcomp.cpp | 2 | ||||
-rw-r--r-- | src/inspircd.cpp | 2 | ||||
-rw-r--r-- | src/inspsocket.cpp | 3 | ||||
-rw-r--r-- | src/listensocket.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_spanningtree/idle.cpp (renamed from src/modules/m_spanningtree/whois.cpp) | 0 | ||||
-rw-r--r-- | src/modules/m_spanningtree/link.h | 1 | ||||
-rw-r--r-- | src/modules/m_watch.cpp | 2 |
8 files changed, 11 insertions, 8 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 0ef8d025f..b3b00248f 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -144,7 +144,7 @@ void nspace::strlower(char *n) #if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) size_t nspace::hash_compare<irc::string, std::less<irc::string> >::operator()(const irc::string &s) const #else - size_t CoreExport nspace::hash<irc::string>::operator()(const irc::string &s) const + size_t CoreExport irc::hash::operator()(const irc::string &s) const #endif { register size_t t = 0; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 47a9fabba..2ac844bb6 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -615,7 +615,7 @@ InspIRCd::InspIRCd(int argc, char** argv) : } #else WindowsIPC = new IPC; - if(!Config->nofork) + if(!Config->cmdline.nofork) { WindowsForkKillOwner(); FreeConsole(); diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 92625ac29..b872ea7e6 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -18,10 +18,11 @@ #ifndef DISABLE_WRITEV #include <sys/uio.h> +#endif + #ifndef IOV_MAX #define IOV_MAX 1024 #endif -#endif BufferedSocket::BufferedSocket() { diff --git a/src/listensocket.cpp b/src/listensocket.cpp index 0bd6cb92b..df27a9c48 100644 --- a/src/listensocket.cpp +++ b/src/listensocket.cpp @@ -41,7 +41,7 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t if (bind_to.sa.sa_family == AF_INET6) { std::string addr = tag->getString("address"); - int enable = (addr.empty() || addr == "*") ? 0 : 1; + const char enable = (addr.empty() || addr == "*") ? 0 : 1; setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &enable, sizeof(enable)); // errors ignored intentionally } diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 69117ae55..e4b2645f9 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -165,7 +165,8 @@ CmdResult CommandFilter::Handle(const std::vector<std::string> ¶meters, User if (parameters.size() == 1) { /* Deleting a filter */ - if (static_cast<ModuleFilter&>(*creator).DeleteFilter(parameters[0])) + Module *me = creator; + if (static_cast<ModuleFilter *>(me)->DeleteFilter(parameters[0])) { user->WriteServ("NOTICE %s :*** Removed filter '%s'", user->nick.c_str(), parameters[0].c_str()); ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(user) ? 'a' : 'A', std::string("FILTER: ")+user->nick+" removed filter '"+parameters[0]+"'"); @@ -212,7 +213,9 @@ CmdResult CommandFilter::Handle(const std::vector<std::string> ¶meters, User { reason = parameters[3]; } - std::pair<bool, std::string> result = static_cast<ModuleFilter&>(*creator).AddFilter(freeform, type, reason, duration, flags); + + Module *me = creator; + std::pair<bool, std::string> result = static_cast<ModuleFilter *>(me)->AddFilter(freeform, type, reason, duration, flags); if (result.first) { user->WriteServ("NOTICE %s :*** Added filter '%s', type '%s'%s%s, flags '%s', reason: '%s'", user->nick.c_str(), freeform.c_str(), diff --git a/src/modules/m_spanningtree/whois.cpp b/src/modules/m_spanningtree/idle.cpp index 59dc83985..59dc83985 100644 --- a/src/modules/m_spanningtree/whois.cpp +++ b/src/modules/m_spanningtree/idle.cpp diff --git a/src/modules/m_spanningtree/link.h b/src/modules/m_spanningtree/link.h index 0ff2593cc..c60cb0bb7 100644 --- a/src/modules/m_spanningtree/link.h +++ b/src/modules/m_spanningtree/link.h @@ -45,5 +45,4 @@ class Autoconnect : public refcountbase Autoconnect(ConfigTag* Tag) : tag(Tag) {} }; - #endif diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 78da2799b..9a9e12bb1 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -90,7 +90,7 @@ #if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash_compare<irc::string, std::less<irc::string> > > watchentries; #else - typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash<irc::string> > watchentries; + typedef nspace::hash_map<irc::string, std::deque<User*>, irc::hash> watchentries; #endif typedef std::map<irc::string, std::string> watchlist; |