diff options
| author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-06 19:18:15 +0000 |
|---|---|---|
| committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-06 19:18:15 +0000 |
| commit | 9b3a357193a020c53624b29f84e0bca4795722f0 (patch) | |
| tree | be1a500c8a469dad8164a72d1266780ac8c28510 /include/services.h | |
| parent | f8ac398b86ea6a26dba62064d9810796466e4118 (diff) | |
BUILD : 1.7.8 (565) BUGS : 293 NOTES : Merge of Win32 branch into the main, support for Unreal +I, German language updated, fixed bug vidents not updating, Setting and Removal of sqlines on forbid or drop
git-svn-id: svn://svn.anope.org/anope/trunk@567 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@417 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/services.h')
| -rw-r--r-- | include/services.h | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/include/services.h b/include/services.h index 4523e2e34..730c04f3d 100644 --- a/include/services.h +++ b/include/services.h @@ -37,24 +37,60 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> + +/* Windows does not have: + * unistd.h, grp.h, + * netdb.h, netinet/in.h, + * sys/socket.h, sys/time.h + * Windows requires: + * winsock.h + * -- codemastr + */ + +#ifndef _WIN32 #include <unistd.h> +#endif + #include <signal.h> #include <time.h> #include <errno.h> + +#ifndef _WIN32 #include <grp.h> +#endif + #include <limits.h> + +#ifndef _WIN32 #include <netdb.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/socket.h> +#else +#include <winsock.h> +#include <windows.h> +#endif + #include <sys/stat.h> /* for umask() on some systems */ #include <sys/types.h> + +#ifndef _WIN32 #include <sys/time.h> +#endif + +#ifdef _WIN32 +#include <sys/timeb.h> +#include <direct.h> +#include <io.h> +#endif + #include <fcntl.h> +#ifndef _WIN32 #ifdef HAVE_BACKTRACE #include <execinfo.h> #endif +#endif #ifdef USE_RDB # define MAX_SQL_BUF 4096 @@ -81,9 +117,14 @@ #endif #ifdef USE_THREADS -# include <pthread.h> + #ifndef _WIN32 + #include <pthread.h> + #endif +#include "threads.h" #endif +#include "sockets.h" + #ifdef _AIX /* Some AIX boxes seem to have bogus includes that don't have these * prototypes. */ @@ -119,6 +160,14 @@ extern int toupper(char), tolower(char); #define encrypt encrypt_ +#ifdef __WINS__ +#ifndef BKCHECK +#define BKCHECK + extern "C" void __pfnBkCheck() {} +#endif +#endif + + #if INTTYPE_WORKAROUND # undef int16 # undef int32 @@ -162,7 +211,20 @@ typedef struct uid_ Uid; /*************************************************************************/ +/* Windows defines a boolean type as an + * unsigned char. It does however need + * true/false. -- codemastr + */ +#ifndef _WIN32 typedef enum { false, true } boolean; +#else + #ifndef true + #define true 1 + #endif + #ifndef false + #define false 0 + #endif +#endif /* _WIN32 */ /*************************************************************************/ @@ -263,6 +325,7 @@ struct ircdvars_ { int invitemode; /* +I */ int sjoinbanchar; /* use single quotes to define it */ int sjoinexchar; /* use single quotes to define it */ + int sjoininvchar; /* use single quotes to define it */ int svsmode_ucmode; /* Can remove User Channel Modes with SVSMODE */ int sglineenforce; char *vhostchar; /* char used for vhosting */ |
