]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_win32wrapper.h
Don't query module version prior to init; fixes valgrind segfault
[user/henk/code/inspircd.git] / win / inspircd_win32wrapper.h
index 6b068adeaa20b2695484b0e192e7e87e04ae2a08..3f16280fdcd63de4c94c61728a791368fa804507 100644 (file)
@@ -101,6 +101,7 @@ typedef unsigned __int32 uint32_t;
 #include <stdio.h>
 #include <algorithm>
 #include <io.h>
+#include <psapi.h>
 
 #ifdef ENABLE_CRASHDUMPS
 #include <DbgHelp.h>
@@ -192,7 +193,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);
+const int CLOCK_REALTIME = 0;
+CoreExport int clock_gettime(int clock, struct timespec * tv);
 
 /* Disable these stupid warnings.. */
 #pragma warning(disable:4800)
@@ -228,14 +230,7 @@ class ServerConfig;
 /* Look up the nameserver in use from the registry on windows */
 CoreExport std::string FindNameServerWin();
 
-/* no uio.h on win, but win has alternatives in io.h rest is wrapped here */
-#define IOV_MAX 1024
-struct iovec
-{
-       size_t  iov_len;
-       void*   iov_base;
-};
-CoreExport ssize_t writev(int fd, const struct iovec* iov, int iovcnt);
+#define DISABLE_WRITEV
 
 /* Clear a windows console */
 CoreExport void ClearConsole();
@@ -246,7 +241,7 @@ CoreExport void WindowsForkKillOwner();
 
 CoreExport void ChangeWindowsSpecificPointers();
 
-CoreExport bool ValidateWindowsDnsServer(ServerConfig* conf, const char* tag, const char* value, ValueItem &data);
+CoreExport void FindDNS(std::string& server);
 
 CoreExport bool initwmi();
 CoreExport void donewmi();