X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_win32wrapper.h;h=be437d4a36c37bba3bd9063782320abe6447ae69;hb=0035820e13a915a3bf1a440fcedf8ce25fe37a22;hp=1f9936caf20e5f5d033cb57c8609376621fd2212;hpb=c05ad37bfd03486475889485606ed5cffc7bf5a2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 1f9936caf..be437d4a3 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -78,6 +78,8 @@ #define strcasecmp _stricmp #define strncasecmp _strnicmp +typedef int ssize_t; + /* Convert formatted (xxx.xxx.xxx.xxx) string to in_addr struct */ CoreExport int insp_inet_pton(int af, const char * src, void * dst); @@ -106,9 +108,6 @@ __inline int inet_aton(const char *cp, struct in_addr *addr) return (addr->s_addr == INADDR_NONE) ? 0 : 1; }; -/* Handles colors in printf */ -int printf_c(const char * format, ...); - /* getopt() wrapper */ #define no_argument 0 #define required_argument 1 @@ -189,5 +188,20 @@ void ::operator delete(void * ptr); #define DISABLE_WRITEV +#include + +class CWin32Exception : public std::exception +{ +public: + CWin32Exception(); + CWin32Exception(const CWin32Exception& other); + virtual const char* what() const throw(); + DWORD GetErrorCode(); + +private: + char szErrorString[500]; + DWORD dwErrorCode; +}; + #endif