summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/inspircdVC71.vcproj6
-rw-r--r--win/inspircd_win32wrapper.cpp14
-rw-r--r--win/inspircd_win32wrapper.h2
3 files changed, 22 insertions, 0 deletions
diff --git a/win/inspircdVC71.vcproj b/win/inspircdVC71.vcproj
index 107cb5036..1bcac8fcd 100644
--- a/win/inspircdVC71.vcproj
+++ b/win/inspircdVC71.vcproj
@@ -146,6 +146,9 @@
RelativePath="..\src\dynamic.cpp">
</File>
<File
+ RelativePath="..\src\filelogger.cpp">
+ </File>
+ <File
RelativePath="..\src\hashcomp.cpp">
</File>
<File
@@ -167,6 +170,9 @@
RelativePath="..\src\modules.cpp">
</File>
<File
+ RelativePath="..\src\server.cpp">
+ </File>
+ <File
RelativePath="..\src\snomasks.cpp">
</File>
<File
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp
index 1646e39af..e6f25df18 100644
--- a/win/inspircd_win32wrapper.cpp
+++ b/win/inspircd_win32wrapper.cpp
@@ -17,12 +17,15 @@
#include <string>
#include <errno.h>
#include <assert.h>
+#pragma comment(lib, "winmm.lib")
using namespace std;
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#endif
+#include <mmsystem.h>
+
/* This MUST remain static and delcared outside the class, so that WriteProcessMemory can reference it properly */
static DWORD owner_processid = 0;
@@ -640,3 +643,14 @@ bool ValidateWindowsDnsServer(ServerConfig* conf, const char* tag, const char* v
}
return true;
}
+
+int gettimeofday(struct timeval * tv, void * tz)
+{
+ if(tv == NULL)
+ return -1;
+
+ DWORD mstime = timeGetTime();
+ tv->tv_sec = time(NULL);
+ tv->tv_usec = (mstime - (tv->tv_sec * 1000)) * 1000;
+ return 0;
+}
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h
index ffda9ff40..17c3f5525 100644
--- a/win/inspircd_win32wrapper.h
+++ b/win/inspircd_win32wrapper.h
@@ -152,6 +152,8 @@ CoreExport DIR * opendir(const char * path);
CoreExport dirent * readdir(DIR * handle);
CoreExport void closedir(DIR * handle);
+CoreExport int gettimeofday(struct timeval * tv, void * tz);
+
/* Disable these stupid warnings.. */
#pragma warning(disable:4800)
#pragma warning(disable:4251)