diff -urbdN exim-3.33-orig/Local/Makefile exim-3.33/Local/Makefile --- exim-3.33-orig/Local/Makefile Thu Jan 1 01:00:00 1970 +++ exim-3.33/Local/Makefile Thu Nov 22 17:48:25 2001 @@ -0,0 +1,113 @@ +MAKE_SHELL=/bin/bash + +#CHOWN_COMMAND=/usr/bin/chown +#CHGRP_COMMAND=/usr/bin/chgrp +#MV_COMMAND=/bin/mv +#RM_COMMAND=/bin/rm +#PERL_COMMAND=/usr/bin/perl + +AR=ar cq + +# AUTH_CRAM_MD5=yes +# AUTH_PLAINTEXT=yes + +BIN_DIRECTORY=/usr/local/exim/bin + +INFO_DIRECTORY=/usr/local/info + +COMPRESS_COMMAND=/bin/gzip +COMPRESS_SUFFIX=gz + +ZCAT_COMMAND=/bin/zcat + +CONFIGURE_FILE=/etc/exim/configure + +# CONFIGURE_FILE_USE_NODE=yes +# CONFIGURE_FILE_USE_EUID=yes + +# DELIVER_BUFFER_SIZE=8192 + +DIRECTOR_ALIASFILE=yes +DIRECTOR_FORWARDFILE=yes +DIRECTOR_LOCALUSER=yes +DIRECTOR_SMARTUSER=yes + +# DB_DIRECTORY_MODE=0750 +# DB_MODE=0640 +# DB_LOCKFILE_MODE=0640 + +EXICYCLOG_MAX=10 + +EXIM_UID=1030 +EXIM_GID=513 + +# EXIM_MONITOR=eximon.bin + +EXIM_PERL=perl.o + +# PERL_CC= +# PERL_CCOPTS= +# PERL_LIBS= + +# HEADER_MAXSIZE="(1024*1024)" + +# INPUT_DIRECTORY_MODE=0750 + +LOG_FILE_PATH=/var/log/exim_%slog +# LOG_DIRECTORY_MODE=0750 +# LOG_MODE=0640 + + +LOOKUP_DBM=yes +LOOKUP_LSEARCH=yes + +# LOOKUP_CDB=yes +# LOOKUP_DNSDB=yes +# LOOKUP_LDAP=yes +LOOKUP_MYSQL=yes +# LOOKUP_NIS=yes +# LOOKUP_NISPLUS=yes +LOOKUP_PGSQL=yes + + +LOOKUP_INCLUDE=-I /usr/include/postgresql -I /usr/include/mysql +LOOKUP_LIBS=-L/usr/local/lib -lmysqlclient -lpq -lz + +# LOOKUP_TESTDB=yes + +# MAXINTERFACES=250 + +# MSGLOG_DIRECTORY_MODE=0750 + +PID_FILE_PATH=/var/run/exim%s.pid + +ROUTER_DOMAINLIST=yes +ROUTER_IPLITERAL=yes +ROUTER_LOOKUPHOST=yes +ROUTER_QUERYPROGRAM=yes + +# This one is very special-purpose, so is not included by default. + +SPOOL_DIRECTORY=/var/spool/exim + +# SPOOL_DIRECTORY_MODE=0750 + +# SPOOL_MODE=0600 + +# STDERR_FILE= + +SUPPORT_MAILDIR=yes +# SUPPORT_MAILSTORE=yes +SUPPORT_MBX=yes + +SUPPORT_TLS=yes +TLS_LIBS=-lssl -lcrypto +TLS_INCLUDE=-I/usr/include/openssl + +TRANSPORT_APPENDFILE=yes +TRANSPORT_AUTOREPLY=yes +TRANSPORT_PIPE=yes +TRANSPORT_SMTP=yes + +INST_CP=/bin/install + diff -urbdN exim-3.33-orig/OS/Makefile-cygwin exim-3.33/OS/Makefile-cygwin --- exim-3.33-orig/OS/Makefile-cygwin Thu Jan 1 01:00:00 1970 +++ exim-3.33/OS/Makefile-cygwin Thu Nov 22 15:09:36 2001 @@ -0,0 +1,23 @@ +# Exim: OS-specific make file for Cygwin. + +BASENAME_COMMAND=/usr/bin/basename + +CFLAGS=-g -O2 -I/usr/local/bind/include +CC=gcc + +DBMLIB = -ldb +USE_DB = yes + +LIBS = -lcrypt +LIBRESOLV = -L/usr/local/bind/lib -lbind + +X11=/usr/X11R6 +XINCLUDE=-I$(X11)/include +XLFLAGS=-L$(X11)/lib +X11_LD_LIB=$(X11)/lib + +#EXIWHAT_PS_ARG=ax +#EXIWHAT_EGREP_ARG='/exim( |$$)' +#EXIWHAT_KILL_ARG=-USR1 + +# End diff -urbdN exim-3.33-orig/OS/os.c-cygwin exim-3.33/OS/os.c-cygwin --- exim-3.33-orig/OS/os.c-cygwin Thu Jan 1 01:00:00 1970 +++ exim-3.33/OS/os.c-cygwin Thu Nov 22 18:40:10 2001 @@ -0,0 +1,90 @@ +/************************************************* +* Exim - an Internet mail transport agent * +*************************************************/ + +/* Copyright (c) University of Cambridge 1997 - 2000 */ +/* See the file NOTICE for conditions of use and distribution. */ + +/* Linux-specific code. This is concatenated onto the generic +src/os.c file. */ + + +/************************************************* +* Load average computation * +* * +* FIX ME FIX ME FIX ME FIX ME FIX ME FIX ME * +*************************************************/ + +#define OS_LOAD_AVERAGE + +int +os_getloadavg(void) +{ + return (1000); +} + +#include +#include +#include + +# ifndef LOCK_SH +# define LOCK_SH 1 +# endif +# ifndef LOCK_EX +# define LOCK_EX 2 +# endif +# ifndef LOCK_NB +# define LOCK_NB 4 +# endif +# ifndef LOCK_UN +# define LOCK_UN 8 +# endif + +int +flock (fd, operation) + int fd; + int operation; +{ + struct flock lock; + + switch (operation & ~LOCK_NB) + { + case LOCK_SH: + lock.l_type = F_RDLCK; + break; + case LOCK_EX: + lock.l_type = F_WRLCK; + break; + case LOCK_UN: + lock.l_type = F_UNLCK; + break; + default: + errno = EINVAL; + return -1; + } + lock.l_whence = SEEK_SET; + lock.l_start = lock.l_len = 0L; + + return fcntl (fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock); +} + + + +/************************************************* +* Finding interface addresses * +*************************************************/ + +/******************** FIX ME PLEASE ************************** + I have no idea how to yield the current running interfaces + for the box I'm on. So it is hardcoded here now, please + someone fix this. +********************* FIX ME PLEASE **************************/ + +ip_address_item * +cygwin_find_running_interfaces(void) +{ + ip_address_item *yield = NULL; + yield = os_common_find_running_interfaces(); + return yield; +} + diff -urbdN exim-3.33-orig/OS/os.h-cygwin exim-3.33/OS/os.h-cygwin --- exim-3.33-orig/OS/os.h-cygwin Thu Jan 1 01:00:00 1970 +++ exim-3.33/OS/os.h-cygwin Thu Nov 22 18:35:13 2001 @@ -0,0 +1,22 @@ +/* Exim: OS-specific C header file for Linux */ + +#define CRYPT_H +#define HAVE_MMAP +#define HAVE_SYS_VFS_H +#define NO_IP_VAR_H +#define GLIBC_IP_OPTIONS +#define SIOCGIFCONF_GIVES_ADDR +#define NO_IP_OPTIONS +#define F_FREESP O_TRUNC + +#define os_strsignal strsignal +#define OS_STRSIGNAL + +typedef struct flock flock_t; + +#define os_find_running_interfaces cygwin_find_running_interfaces + +struct ip_address_item; +extern struct ip_address_item *cygwin_find_running_interfaces(void); + +/* End */ diff -urbdN exim-3.33-orig/scripts/exim_install exim-3.33/scripts/exim_install --- exim-3.33-orig/scripts/exim_install Wed Aug 15 13:09:07 2001 +++ exim-3.33/scripts/exim_install Thu Nov 22 18:53:32 2001 @@ -173,21 +173,21 @@ fi if [ $name = exim ]; then echo ${CHOWN} ${INST_UID} ${BIN_DIRECTORY}/exim - ${real} ${CHOWN} ${INST_UID} ${BIN_DIRECTORY}/exim +# ${real} ${CHOWN} ${INST_UID} ${BIN_DIRECTORY}/exim if [ $? -ne 0 ]; then echo $com "" echo $com "*** You must be ${INST_UID} to install exim ***" exit 1 fi echo ${CHMOD} a+x ${BIN_DIRECTORY}/exim - ${real} ${CHMOD} a+x ${BIN_DIRECTORY}/exim + ${real} ${CHMOD} a+x ${BIN_DIRECTORY}/exim.exe if [ $? -ne 0 ]; then echo $com "" echo $com "*** Exim installation ${ver}failed ***" exit 1 fi echo ${CHMOD} u+s ${BIN_DIRECTORY}/exim - ${real} ${CHMOD} u+s ${BIN_DIRECTORY}/exim + ${real} ${CHMOD} u+s ${BIN_DIRECTORY}/exim.exe if [ $? -ne 0 ]; then echo $com "" echo $com "*** Exim installation ${ver}failed ***" diff -urbdN exim-3.33-orig/scripts/os-type exim-3.33/scripts/os-type --- exim-3.33-orig/scripts/os-type Wed Aug 15 13:09:07 2001 +++ exim-3.33/scripts/os-type Thu Nov 22 15:00:11 2001 @@ -54,6 +54,7 @@ bsdi*) os=BSDI;; BSDOS) os=BSDI;; BSD_OS) os=BSDI;; +CYGWIN*) os=cygwin;; dgux) os=DGUX;; freebsd*) os=FreeBSD;; gnu) os=GNU;; diff -urbdN exim-3.33-orig/src/directors/forwardfile.c exim-3.33/src/directors/forwardfile.c --- exim-3.33-orig/src/directors/forwardfile.c Wed Aug 15 13:09:08 2001 +++ exim-3.33/src/directors/forwardfile.c Thu Nov 22 16:07:36 2001 @@ -865,7 +865,9 @@ if (restore_uid) { mac_seteuid(root_uid); +#ifndef __CYGWIN__ if (dblock->initgroups) setgroups(0, NULL); +#endif mac_setegid(saved_egid); mac_seteuid(saved_euid); DEBUG(2) debug_print_ids("restored"); diff -urbdN exim-3.33-orig/src/exim.c exim-3.33/src/exim.c --- exim-3.33-orig/src/exim.c Wed Aug 15 13:09:09 2001 +++ exim-3.33/src/exim.c Thu Nov 22 16:12:10 2001 @@ -1839,6 +1839,7 @@ root here happens only in some unusual configurations. We just ignore the error. */ +#ifndef __CYGWIN__ if (setgroups(0, NULL) != 0) { if (setgroups(1, group_list) != 0 && !unprivileged) @@ -1847,6 +1848,7 @@ exit(EXIT_FAILURE); } } +#endif /* If the configuration file name has been altered by an argument on the command line (either a new file name or a macro definition) and the caller is diff -urbdN exim-3.33-orig/src/functions.h exim-3.33/src/functions.h --- exim-3.33-orig/src/functions.h Wed Aug 15 13:09:09 2001 +++ exim-3.33/src/functions.h Thu Nov 22 15:15:00 2001 @@ -146,7 +146,10 @@ extern void os_restarting_signal(int, void (*)(int)); extern void os_non_restarting_signal(int, void (*)(int)); extern char *os_strexit(int); + +#ifndef __CYGWIN__ extern char *os_strsignal(int); +#endif extern char *parse_extract_address(char *, char **, int *, int *, int *, BOOL); extern int parse_extract_addresses(char *, char *, address_item **, char **, diff -urbdN exim-3.33-orig/src/transports/appendfile.c exim-3.33/src/transports/appendfile.c --- exim-3.33-orig/src/transports/appendfile.c Wed Aug 15 13:09:12 2001 +++ exim-3.33/src/transports/appendfile.c Thu Nov 22 16:35:27 2001 @@ -796,7 +795,7 @@ apply_lock(int fd, int type, int timeout) { int yield; -struct flock lock_data; +flock_t lock_data; lock_data.l_type = type; lock_data.l_whence = lock_data.l_start = lock_data.l_len = 0;