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 /src/tools | |
| 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 'src/tools')
| -rw-r--r-- | src/tools/anopesmtp.c | 17 | ||||
| -rw-r--r-- | src/tools/smtp.h | 33 |
2 files changed, 45 insertions, 5 deletions
diff --git a/src/tools/anopesmtp.c b/src/tools/anopesmtp.c index 12949c9f9..910caa3bc 100644 --- a/src/tools/anopesmtp.c +++ b/src/tools/anopesmtp.c @@ -20,6 +20,23 @@ static int curday = 0; /*************************************************************************/ +#ifdef _WIN32 +int strcasecmp(const char *s1, const char *s2) +{ + register int c; + + while ((c = tolower(*s1)) == tolower(*s2)) { + if (c == 0) + return 0; + s1++; + s2++; + } + if (c < tolower(*s2)) + return -1; + return 1; +} +#endif + static int get_logname(char *name, int count, struct tm *tm) { diff --git a/src/tools/smtp.h b/src/tools/smtp.h index bce460684..7ffda89e8 100644 --- a/src/tools/smtp.h +++ b/src/tools/smtp.h @@ -24,21 +24,39 @@ #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> -#include <grp.h> #include <limits.h> + +#ifndef _WIN32 #include <netdb.h> #include <netinet/in.h> -#include <arpa/inet.h> #include <sys/socket.h> -#include <sys/stat.h> +#else +#include <winsock.h> +#include <windows.h> +#endif + #include <sys/types.h> + +#ifndef _WIN32 #include <sys/time.h> -#include <fcntl.h> -#include <ctype.h> +#endif #ifdef _AIX extern int strcasecmp(const char *, const char *); @@ -49,6 +67,11 @@ extern int connect(int, struct sockaddr *, int); # endif #endif /* _AIX */ +#ifdef _WIN32 +#define PATH_MAX MAX_PATH +#define snprintf _snprintf +#endif + /*************************************************************************/ |
