X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_win32wrapper.h;h=a7f2b4354ce3c3abf03cae8c2939b701de4484c0;hb=5a366d8945e1312190d0012eb36d2facaa908650;hp=a1463b318cc19ee48e2ad165400709bfd3f6e72f;hpb=b89aa87280767f47381b8a612f73f1d0fe682e2e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index a1463b318..a7f2b4354 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -68,6 +68,12 @@ #include #include #include +#include + +#define F_OK 0 /* test for existence of file */ +#define X_OK (1<<0) /* test for execute or search permission */ +#define W_OK (1<<1) /* test for write permission */ +#define R_OK (1<<2) /* test for read permission */ /* Windows defines this already. */ #undef ERROR @@ -90,6 +96,10 @@ CoreExport const char * insp_inet_ntop(int af, const void * src, char * dst, soc #define snprintf _snprintf #define vsnprintf _vsnprintf +#ifndef va_copy +#define va_copy(dest, src) (dest = src) +#endif + /* Unix-style sleep (argument is in seconds) */ __inline void sleep(int seconds) { Sleep(seconds * 1000); } @@ -97,6 +107,9 @@ __inline void sleep(int seconds) { Sleep(seconds * 1000); } #define popen _popen #define pclose _pclose +/* _access */ +#define access _access + /* IPV4 only convert string to address struct */ __inline int inet_aton(const char *cp, struct in_addr *addr) { @@ -198,3 +211,6 @@ private: char szErrorString[500]; DWORD dwErrorCode; }; + +// Same value as EXIT_STATUS_FORK (EXIT_STATUS_FORK is unused on Windows) +#define EXIT_STATUS_SERVICE 4