]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_win32wrapper.h
Cap masks and bans at 250 characters
[user/henk/code/inspircd.git] / win / inspircd_win32wrapper.h
index 86a7baffe36fdb6ec418a78c6a407169235f3589..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>
@@ -132,9 +133,6 @@ CoreExport const char * insp_inet_ntop(int af, const void * src, char * dst, soc
 #define inet_pton insp_inet_pton
 #define inet_ntop insp_inet_ntop
 
-/* slightly different format on setsockopt */
-CoreExport int insp_setsockopt(int sockfd, int level, int optname, void *optval, int optlen);
-
 /* Safe printf functions aren't defined in VC2003 */
 #define snprintf _snprintf
 #define vsnprintf _vsnprintf
@@ -195,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)
@@ -231,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();
@@ -249,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();