summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/configreader.h2
-rw-r--r--include/modules/regex.h2
-rw-r--r--src/configparser.cpp4
-rw-r--r--src/listensocket.cpp3
-rw-r--r--src/modules/m_spanningtree/commands.h4
-rw-r--r--win/modules/CMakeLists.txt17
6 files changed, 23 insertions, 9 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 2aab0a075..6786604b5 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -58,7 +58,7 @@ class CoreExport ConfigTag : public refcountbase
* @param max Maximum acceptable value (optional)
* @return The duration in seconds
*/
- time_t getDuration(const std::string& key, time_t def = 0, long min = LONG_MIN, long max = LONG_MAX);
+ long getDuration(const std::string& key, long def = 0, long min = LONG_MIN, long max = LONG_MAX);
/** Get the value of an option
* @param key The option to get
diff --git a/include/modules/regex.h b/include/modules/regex.h
index 0bced4e2b..5ef00cdd0 100644
--- a/include/modules/regex.h
+++ b/include/modules/regex.h
@@ -46,7 +46,7 @@ public:
class RegexFactory : public DataProvider
{
public:
- RegexFactory(Module* creator, const std::string& name) : DataProvider(creator, name) { }
+ RegexFactory(Module* Creator, const std::string& Name) : DataProvider(Creator, Name) { }
virtual Regex* Create(const std::string& expr) = 0;
};
diff --git a/src/configparser.cpp b/src/configparser.cpp
index d3723d350..0e2a86706 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -460,13 +460,13 @@ void ConfigTag::CheckRange(const std::string& key, long& res, long def, long min
}
}
-time_t ConfigTag::getDuration(const std::string& key, long def, long min, long max)
+long ConfigTag::getDuration(const std::string& key, long def, long min, long max)
{
std::string duration;
if (!readString(key, duration))
return def;
- time_t ret = InspIRCd::Duration(duration);
+ long ret = InspIRCd::Duration(duration);
CheckRange(key, ret, def, min, max);
return ret;
}
diff --git a/src/listensocket.cpp b/src/listensocket.cpp
index 9b69b53ff..ca518c59e 100644
--- a/src/listensocket.cpp
+++ b/src/listensocket.cpp
@@ -21,7 +21,10 @@
#include "inspircd.h"
#include "socket.h"
#include "socketengine.h"
+
+#ifndef _WIN32
#include <netinet/tcp.h>
+#endif
ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_to)
: bind_tag(tag)
diff --git a/src/modules/m_spanningtree/commands.h b/src/modules/m_spanningtree/commands.h
index d0465a447..700176a16 100644
--- a/src/modules/m_spanningtree/commands.h
+++ b/src/modules/m_spanningtree/commands.h
@@ -259,10 +259,10 @@ class CommandSNONotice : public ServerCommand
CmdResult Handle(User* user, std::vector<std::string>& parameters);
};
-class CommandVersion : public ServerOnlyServerCommand<CommandServer>
+class CommandVersion : public ServerOnlyServerCommand<CommandVersion>
{
public:
- CommandVersion(Module* Creator) : ServerOnlyServerCommand<CommandServer>(Creator, "VERSION", 1) { }
+ CommandVersion(Module* Creator) : ServerOnlyServerCommand<CommandVersion>(Creator, "VERSION", 1) { }
CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters);
};
diff --git a/win/modules/CMakeLists.txt b/win/modules/CMakeLists.txt
index 5778d944a..386d3600d 100644
--- a/win/modules/CMakeLists.txt
+++ b/win/modules/CMakeLists.txt
@@ -8,9 +8,15 @@ list(SORT INSPIRCD_MODULES)
add_definitions("-DDLL_BUILD")
foreach(MODULE_NAME ${INSPIRCD_MODULES})
- string(REGEX REPLACE "^.*[/\\](.*).cpp$" "\\1.so" SO_NAME ${MODULE_NAME})
+ string(REGEX REPLACE "^.*[/\\](.*).cpp$" "\\1" BASE_NAME ${MODULE_NAME})
+ set(SO_NAME "${BASE_NAME}.so")
add_library(${SO_NAME} MODULE ${MODULE_NAME})
- set_target_properties(${SO_NAME} PROPERTIES PREFIX "" SUFFIX "")
+ set_target_properties(${SO_NAME} PROPERTIES
+ PREFIX ""
+ SUFFIX ""
+ COMPILE_DEFINITIONS "MODNAME=\"${BASE_NAME}\""
+ )
+
target_link_libraries(${SO_NAME} inspircd)
add_dependencies(${SO_NAME} inspircd)
if(MSVC)
@@ -24,7 +30,12 @@ file(GLOB INSPIRCD_MODULES_SPANNINGTREE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${
list(SORT INSPIRCD_MODULES_SPANNINGTREE)
add_library(m_spanningtree.so MODULE ${INSPIRCD_MODULES_SPANNINGTREE})
-set_target_properties(m_spanningtree.so PROPERTIES PREFIX "" SUFFIX "")
+set_target_properties(m_spanningtree.so PROPERTIES
+ PREFIX ""
+ SUFFIX ""
+ COMPILE_DEFINITIONS "MODNAME=\"m_spanningtree\""
+)
+
target_link_libraries(m_spanningtree.so inspircd)
add_dependencies(m_spanningtree.so inspircd)
if(MSVC)