summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/inspircdVC90.vcxproj12
-rw-r--r--win/inspircd_namedpipe.cpp2
-rw-r--r--win/inspircd_win32wrapper.cpp50
-rw-r--r--win/inspircd_win32wrapper.h13
-rw-r--r--win/m_spanningtreeVC90.vcproj8
-rw-r--r--win/m_spanningtreeVC90.vcxproj35
6 files changed, 82 insertions, 38 deletions
diff --git a/win/inspircdVC90.vcxproj b/win/inspircdVC90.vcxproj
index 22682a09a..2b711e35f 100644
--- a/win/inspircdVC90.vcxproj
+++ b/win/inspircdVC90.vcxproj
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -484,6 +485,7 @@ nmake -f modules.mak
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\src\command_parse.cpp" />
+ <ClCompile Include="..\src\configparser.cpp" />
<ClCompile Include="..\src\configreader.cpp" />
<ClCompile Include="..\src\cull_list.cpp" />
<ClCompile Include="..\src\dns.cpp" />
@@ -498,7 +500,6 @@ nmake -f modules.mak
<ClCompile Include="..\src\logger.cpp" />
<ClCompile Include="..\src\mode.cpp" />
<ClCompile Include="..\src\modes\cmode_b.cpp" />
- <ClCompile Include="..\src\modes\cmode_h.cpp" />
<ClCompile Include="..\src\modes\cmode_i.cpp" />
<ClCompile Include="..\src\modes\cmode_k.cpp" />
<ClCompile Include="..\src\modes\cmode_l.cpp" />
@@ -513,12 +514,14 @@ nmake -f modules.mak
<ClCompile Include="..\src\modes\umode_o.cpp" />
<ClCompile Include="..\src\modes\umode_s.cpp" />
<ClCompile Include="..\src\modes\umode_w.cpp" />
+ <ClCompile Include="..\src\modmanager_dynamic.cpp" />
<ClCompile Include="..\src\modules.cpp" />
<ClCompile Include="..\src\server.cpp" />
<ClCompile Include="..\src\snomasks.cpp" />
<ClCompile Include="..\src\socket.cpp" />
<ClCompile Include="..\src\socketengine.cpp" />
<ClCompile Include="..\src\socketengines\socketengine_select.cpp" />
+ <ClCompile Include="..\src\stats.cpp" />
<ClCompile Include="..\src\testsuite.cpp" />
<ClCompile Include="..\src\threadengine.cpp" />
<ClCompile Include="..\src\threadengines\threadengine_win32.cpp" />
@@ -527,6 +530,7 @@ nmake -f modules.mak
<ClCompile Include="..\src\userprocess.cpp" />
<ClCompile Include="..\src\users.cpp" />
<ClCompile Include="..\src\user_resolver.cpp" />
+ <ClCompile Include="..\src\whois.cpp" />
<ClCompile Include="..\src\wildcard.cpp" />
<ClCompile Include="..\src\xline.cpp" />
<ClCompile Include="inspircd_memory_functions.cpp" />
@@ -995,9 +999,6 @@ nmake -f modules.mak
<CustomBuild Include="..\src\modules\m_abbreviation.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuild>
- <ClCompile Include="..\src\socketengines\socketengine_iocp.cpp">
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)</ObjectFileName>
- </ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\modules\account.h">
@@ -1130,7 +1131,6 @@ nmake -f modules.mak
<ClInclude Include="..\include\snomasks.h" />
<ClInclude Include="..\include\socket.h" />
<ClInclude Include="..\include\socketengine.h" />
- <ClInclude Include="..\include\socketengines\socketengine_iocp.h" />
<ClInclude Include="..\include\socketengines\socketengine_select.h" />
<ClInclude Include="..\include\testsuite.h" />
<ClInclude Include="..\include\threadengine.h" />
diff --git a/win/inspircd_namedpipe.cpp b/win/inspircd_namedpipe.cpp
index 76d16037b..46f462832 100644
--- a/win/inspircd_namedpipe.cpp
+++ b/win/inspircd_namedpipe.cpp
@@ -165,7 +165,7 @@ void IPC::Check()
/* Toggle debug */
thread->SetResult(0);
thread->ClearStatus();
- ServerInstance->Config->forcedebug = !ServerInstance->Config->forcedebug;
+ ServerInstance->Config->cmdline.forcedebug = !ServerInstance->Config->cmdline.forcedebug;
break;
}
}
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp
index d82c90a61..88ea338c6 100644
--- a/win/inspircd_win32wrapper.cpp
+++ b/win/inspircd_win32wrapper.cpp
@@ -238,7 +238,7 @@ int printf_c(const char * format, ...)
int optind = 1;
char optarg[514];
-int getopt_long_only(int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind)
+int getopt_long(int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind)
{
// burlex todo: handle the shortops, at the moment it only works with longopts.
@@ -556,7 +556,7 @@ int clock_gettime(int clock, struct timespec * tv)
DWORD mstime = timeGetTime();
tv->tv_sec = time(NULL);
- tv->tv_usec = (mstime - (tv->tv_sec * 1000)) * 1000000;
+ tv->tv_nsec = (mstime - (tv->tv_sec * 1000)) * 1000000;
return 0;
}
@@ -696,3 +696,49 @@ int getcpu()
return cpu;
}
+
+int random()
+{
+ return rand();
+}
+
+void srandom(unsigned int seed)
+{
+ srand(seed);
+}
+
+int gettimeofday(timeval *tv, void *)
+{
+ SYSTEMTIME st;
+ GetSystemTime(&st);
+
+ tv->tv_sec = ServerInstance->Time();
+ tv->tv_usec = st.wMilliseconds;
+
+ return 0;
+}
+
+/* World's largest hack to make m_spanningtree work */
+#include "../src/modules/m_spanningtree/link.h"
+static void unused_Function()
+{
+ reference<Link> unused_Link;
+ reference<Autoconnect> unused_Autoconnect;
+
+ if (unused_Link)
+ unused_Link->Port = -1;
+ if (unused_Autoconnect)
+ unused_Autoconnect->NextConnectTime = -1;
+
+ Autoconnect *a = unused_Autoconnect;
+ Link *l = unused_Link;
+
+ unused_Link = reference<Link>(unused_Link);
+ unused_Autoconnect = reference<Autoconnect>(unused_Autoconnect);
+
+ unused_Link = reference<Link>(l);
+ unused_Autoconnect = reference<Autoconnect>(a);
+
+ delete unused_Link;
+ delete unused_Autoconnect;
+}
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h
index 3f16280fd..36307ee00 100644
--- a/win/inspircd_win32wrapper.h
+++ b/win/inspircd_win32wrapper.h
@@ -140,6 +140,8 @@ CoreExport const char * insp_inet_ntop(int af, const void * src, char * dst, soc
/* Since when does the ISO C++ standard *remove* C functions?! */
#define mkdir(file,mode) _mkdir(file)
+#define strncasecmp strnicmp
+
/* Unix-style sleep (argument is in seconds) */
__inline void sleep(int seconds) { Sleep(seconds * 1000); }
@@ -165,7 +167,7 @@ struct option
};
extern int optind;
extern char optarg[514];
-int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind);
+int getopt_long(int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind);
/* Module Loading */
#define dlopen(path, state) (void*)LoadLibrary(path)
@@ -189,6 +191,12 @@ struct DIR
bool first;
};
+struct timespec
+{
+ time_t tv_sec;
+ long tv_nsec;
+};
+
CoreExport DIR * opendir(const char * path);
CoreExport dirent * readdir(DIR * handle);
CoreExport void closedir(DIR * handle);
@@ -246,6 +254,9 @@ CoreExport void FindDNS(std::string& server);
CoreExport bool initwmi();
CoreExport void donewmi();
CoreExport int getcpu();
+CoreExport int random();
+CoreExport void srandom(unsigned seed);
+CoreExport int gettimeofday(timeval *tv, void *);
#endif
diff --git a/win/m_spanningtreeVC90.vcproj b/win/m_spanningtreeVC90.vcproj
index 785416986..294d81146 100644
--- a/win/m_spanningtreeVC90.vcproj
+++ b/win/m_spanningtreeVC90.vcproj
@@ -66,7 +66,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib inspircd.lib cmd_whois.lib cmd_stats.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
+ AdditionalDependencies="ws2_32.lib inspircd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
OutputFile="$(OutDir)/m_spanningtree.so"
LinkIncremental="1"
AdditionalLibraryDirectories="..\bin\debug\bin;..\bin\debug\lib"
@@ -148,7 +148,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib inspircd.lib cmd_whois.lib cmd_stats.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
+ AdditionalDependencies="ws2_32.lib inspircd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
OutputFile="$(OutDir)/m_spanningtree.so"
LinkIncremental="1"
AdditionalLibraryDirectories="..\bin\release\bin;..\bin\release\lib"
@@ -234,7 +234,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib inspircd.lib cmd_whois.lib cmd_stats.lib"
+ AdditionalDependencies="ws2_32.lib inspircd.lib"
OutputFile="$(OutDir)/m_spanningtree.so"
LinkIncremental="1"
AdditionalLibraryDirectories="..\bin\debug_x64\bin;..\bin\debug_x64\lib"
@@ -315,7 +315,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib inspircd.lib cmd_whois.lib cmd_stats.lib"
+ AdditionalDependencies="ws2_32.lib inspircd.lib"
OutputFile="$(OutDir)/m_spanningtree.so"
LinkIncremental="1"
AdditionalLibraryDirectories="..\bin\release_x64\bin;..\bin\release_x64\lib"
diff --git a/win/m_spanningtreeVC90.vcxproj b/win/m_spanningtreeVC90.vcxproj
index 868851e7c..e7f3a55e3 100644
--- a/win/m_spanningtreeVC90.vcxproj
+++ b/win/m_spanningtreeVC90.vcxproj
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -113,7 +114,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;inspircd.lib;cmd_whois.lib;cmd_stats.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;inspircd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\bin\debug\bin;..\bin\debug\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)m_spanningtree.pdb</ProgramDatabaseFile>
@@ -142,7 +143,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;inspircd.lib;cmd_whois.lib;cmd_stats.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;inspircd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\bin\debug_x64\bin;..\bin\debug_x64\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)m_spanningtree.pdb</ProgramDatabaseFile>
@@ -159,7 +160,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>MinSpace</Optimization>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>..\include;..\win;..\src\modules\m_spanningtree;.;..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\include;..\win;.;..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;M_SPANNINGTREE_EXPORTS;DLL_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -169,7 +170,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;inspircd.lib;cmd_whois.lib;cmd_stats.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;inspircd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\bin\release\bin;..\bin\release\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -205,7 +206,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;inspircd.lib;cmd_whois.lib;cmd_stats.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;inspircd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\bin\release_x64\bin;..\bin\release_x64\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -220,67 +221,53 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\modules\m_spanningtree\addline.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\admin.cpp" />
+ <ClCompile Include="..\src\modules\m_spanningtree\away.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\cachetimer.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\capab.cpp" />
+ <ClCompile Include="..\src\modules\m_spanningtree\compat.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\delline.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\encap.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\fhost.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\fjoin.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\fmode.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\fname.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\ftopic.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\handshaketimer.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\hmac.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\kill.cpp" />
+ <ClCompile Include="..\src\modules\m_spanningtree\idle.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\main.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\metadata.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\modules.cpp">
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)modules_spanningtree.obj</ObjectFileName>
- </ClCompile>
- <ClCompile Include="..\src\modules\m_spanningtree\motd.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\netburst.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\nickcollide.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\operquit.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\opertype.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_admin.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\override_map.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_modules.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_motd.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\override_squit.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\override_stats.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_time.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\override_whois.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\ping.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\pong.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\postcommand.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\precommand.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\privmsg.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\protocolinterface.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\push.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\rconnect.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\resolvers.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\rsquit.cpp" />
+ <ClCompile Include="..\src\modules\m_spanningtree\save.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\server.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)servers_spanningtree.obj</ObjectFileName>
</ClCompile>
- <ClCompile Include="..\src\modules\m_spanningtree\stats.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\svsjoin.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\svsnick.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\svspart.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\time.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\treeserver.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\treesocket1.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\treesocket2.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\uid.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\utils.cpp" />
<ClCompile Include="..\src\modules\m_spanningtree\version.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\whois.cpp" />
<ClCompile Include="inspircd_memory_functions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\modules\m_spanningtree\cachetimer.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\handshaketimer.h" />
<ClInclude Include="..\src\modules\m_spanningtree\link.h" />
<ClInclude Include="..\src\modules\m_spanningtree\main.h" />
<ClInclude Include="..\src\modules\m_spanningtree\protocolinterface.h" />