]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_win32wrapper.h
Tidyups, remove of ifdefs
[user/henk/code/inspircd.git] / win / inspircd_win32wrapper.h
index 250f41e3fce2022e0d38e9402f33fb33b88b3866..0fd43fab8a7f3cfaaebbbd925aa148848dd23995 100644 (file)
 
 /* Make builds smaller, leaner and faster */
 #define VC_EXTRALEAN
+#define WIN32_LEAN_AND_MEAN
+
+/* Not defined in windows */
+#define SIGHUP 1
 
 /* They just have to be *different*, don't they. */
 #define PATH_MAX MAX_PATH
@@ -66,9 +70,6 @@
 #include <stdio.h>
 #include <algorithm>
 
-/* printf_c support for printing ansi colors in console */
-#include "colours.h"
-
 /* strcasecmp is not defined on windows by default */
 #define strcasecmp _stricmp
 
@@ -103,6 +104,9 @@ CoreExport int inet_aton(const char *, struct in_addr *);
 /* Unix-style get running user id */
 CoreExport int geteuid();
 
+/* Handles colors in printf */
+CoreExport int printf_c(const char * format, ...);
+
 /* getopt() wrapper */
 # define no_argument            0
 # define required_argument      1
@@ -174,10 +178,19 @@ void ::operator delete(void * ptr);
 
 /* IPC Handlers */
 class InspIRCd;
+class ValueItem;
+class ServerConfig;
 
-void InitIPC();
-void CheckIPC(InspIRCd * Instance);
-void CloseIPC();
+class IPC
+{
+ private:
+       InspIRCd* Instance;
+       HANDLE hIPCPipe;
+ public:
+       IPC(InspIRCd* Srv);
+       void Check();
+       ~IPC();
+};
 
 /* Look up the nameserver in use from the registry on windows */
 std::string FindNameServerWin();
@@ -185,5 +198,11 @@ std::string FindNameServerWin();
 /* Clear a windows console */
 void ClearConsole();
 
+DWORD WindowsForkStart(InspIRCd* Instance);
+
+void WindowsForkKillOwner(InspIRCd* Instance);
+
+bool ValidateWindowsDnsServer(ServerConfig* conf, const char* tag, const char* value, ValueItem &data);
+
 #endif