X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_win32wrapper.h;h=94f799c189829a7a8912b7e7dbb2fc4bb12d8ca9;hb=839ff9b5213977c8dfc74d605c7ceaace89fa66f;hp=7de1fb44cfa30944d6b5efd2fc444397bb5ce46e;hpb=f5fc5d6fab1e0f59980459913be1cab540d3dd7c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 7de1fb44c..94f799c18 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -24,7 +24,7 @@ #define ENABLE_CRASHDUMPS 0 /* This defaults to 64, way too small for an ircd! */ -#define FD_SETSIZE 12000 +#define FD_SETSIZE 24000 /* Make builds smaller, leaner and faster */ #define VC_EXTRALEAN @@ -55,6 +55,9 @@ #define DllExport __declspec(dllimport) #endif +/* Redirect main() through a different method in win32service.cpp, to intercept service startup */ +#define ENTRYPOINT CoreExport int smain(int argc, char** argv) + /* Disable the deprecation warnings.. it spams :P */ #define _CRT_SECURE_NO_DEPRECATE #define _SCL_SECURE_NO_DEPRECATE @@ -104,6 +107,9 @@ CoreExport const char * inet_ntop(int af, const void * src, char * dst, socklen_ #define snprintf _snprintf #define vsnprintf _vsnprintf +/* Since when does the ISO C++ standard *remove* C functions?! */ +#define mkdir(file,mode) _mkdir(file) + /* Recursive token function doesn't exist in VC++ */ CoreExport char * strtok_r(char *_String, const char *_Control, char **_Context); @@ -172,6 +178,8 @@ CoreExport int gettimeofday(struct timeval * tv, void * tz); #pragma warning(disable:4312) // warning C4312: 'type cast' : conversion from 'int' to 'HANDLE' of greater size #pragma warning(disable:4355) // warning C4355: 'this' : used in base member initializer list #pragma warning(disable:4996) // warning C4996: 'std::_Traits_helper::move_s' was declared deprecated +#pragma warning(disable:4706) // warning C4706: assignment within conditional expression +#pragma warning(disable:4201) // mmsystem.h generates this warning /* Mehhhh... typedefs. */ @@ -190,30 +198,24 @@ class InspIRCd; class ValueItem; class ServerConfig; -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(); +CoreExport std::string FindNameServerWin(); /* Clear a windows console */ -void ClearConsole(); +CoreExport void ClearConsole(); + +CoreExport DWORD WindowsForkStart(InspIRCd* Instance); + +CoreExport void WindowsForkKillOwner(InspIRCd* Instance); -DWORD WindowsForkStart(InspIRCd* Instance); +CoreExport void ChangeWindowsSpecificPointers(InspIRCd* Instance); -void WindowsForkKillOwner(InspIRCd* Instance); +CoreExport bool ValidateWindowsDnsServer(ServerConfig* conf, const char* tag, const char* value, ValueItem &data); -void ChangeWindowsSpecificPointers(InspIRCd* Instance); +CoreExport bool initwmi(); +CoreExport void donewmi(); +CoreExport int getcpu(); -bool ValidateWindowsDnsServer(ServerConfig* conf, const char* tag, const char* value, ValueItem &data); #endif