diff -rup procmail-3.22.orig/Makefile procmail-3.22-7/Makefile --- procmail-3.22.orig/Makefile 2001-09-11 00:53:09.000000000 -0400 +++ procmail-3.22-7/Makefile 2002-08-19 10:16:16.000000000 -0400 @@ -97,6 +97,7 @@ LDFLAGS1= $(LDFLAGS0) $(LIBS) #-lcposix ####CC = cc # gcc # object file extension O = o +EXE = RM = /bin/rm -f MV = mv -f LN = ln @@ -107,7 +108,7 @@ STRIP = strip MKDIRS = new/mkinstalldirs SUBDIRS = src man -BINSS = procmail lockfile formail mailstat +BINSS = procmail$(EXE) lockfile$(EXE) formail$(EXE) mailstat MANS1S = procmail formail lockfile MANS5S = procmailrc procmailsc procmailex diff -rup procmail-3.22.orig/Makefile.1 procmail-3.22-7/Makefile.1 --- procmail-3.22.orig/Makefile.1 2001-09-11 00:53:09.000000000 -0400 +++ procmail-3.22-7/Makefile.1 2002-08-19 10:16:16.000000000 -0400 @@ -9,6 +9,7 @@ make: @$(SHELL) -c "exit 0" .PRECIOUS: Makefile +.PHONY: install help target targets: @sed "/^##*\*#$$/,/^##*\*#$$/ !d" make_n $(SHELL) ./autoconf $(SHELL) "$(RM)" "$(MV)" $(DEVNULL) \ - "$(FGREP)" "$(MAKE)" $(O) "$(LOCKINGTEST)" \ + "$(FGREP)" "$(MAKE)" $(O) "$(EXE)" "$(LOCKINGTEST)" \ "$(VISIBLE_BINDIR)" $@ autoconf.h: ../autoconf.h @@ -185,8 +185,8 @@ clean: $(RM) -r _locktest $(RM) procmail.$(O) $(PM_OBJ) lockfile.$(O) $(LF_OBJ) formail.$O \ $(FM_OBJ) multigram.$(O) $(MG_OBJ) $(BINSS) multigram ../autoconf.h \ - _autotst* lookfor _locktst* grepfor recommend recommend.$(O) manconf \ - _Makefile lock.log *core* targetdir.h setid setid.$(O) gethome \ + _autotst* lookfor _locktst* grepfor recommend$(EXE) recommend.$(O) manconf \ + _Makefile lock.log *core* targetdir.h setid$(EXE) setid.$(O) gethome \ gethome.$(O) make_n realloc.log Makefile: ../Makefile Makefile.0 diff -rup procmail-3.22.orig/src/autoconf procmail-3.22-7/src/autoconf --- procmail-3.22.orig/src/autoconf 2001-09-11 00:55:46.000000000 -0400 +++ procmail-3.22-7/src/autoconf 2002-08-19 10:16:16.000000000 -0400 @@ -120,6 +120,7 @@ shift; DEVNULL=$1 shift; FGREP="$1" shift; MAKE="$1" shift; O=$1 +shift; EXE=$1 shift; LOCKINGTEST="$1" shift; BINDIR=$1 shift; ACONF=$1 @@ -674,10 +675,10 @@ else kill -15 $$ fi -$MV _locktst _locktst.$$ 2>$DEVNULL +$MV _locktst$EXE _locktst.$$ 2>$DEVNULL $RM _autotst.$O _autotst.rrr _locktst* 2>$DEVNULL echo "" >_locktst.pid -$MV _autotst _locktst +$MV _autotst$EXE _locktst$EXE case "$testdirs" in *[a-zA-Z/]*) @@ -743,7 +744,7 @@ else $RM *core* fi fi -$RM _autotst.$O _autotst +$RM _autotst.$O _autotst$EXE cat >_autotst.c <>$ACONF fi +# Cygwin does not support endprotoent() and endservent() +case `uname -s` in + CYGWIN_NT*) echo "#define NO_COMSAT" >>$ACONF;; + *);; +esac + $RM _autotst.$O cat >_autotst.c <_autotst.c <_autotst.rrr 2>&1 -$RM _autotst _autotst.$O +$RM _autotst$EXE _autotst.$O # The simple ones for func in strcspn strpbrk rename pow mkdir fstat initgroups \ @@ -1137,7 +1144,7 @@ HERE fi fi grepfor sys_errlist '#define NOsys_errlist' - $RM _autotst _autotst.$O _autotst.rrr + $RM _autotst$EXE _autotst.$O _autotst.rrr fi echo 'Testing for brain damage' @@ -1177,7 +1184,7 @@ HERE echo 'Sorry, incompetent bcopy, using substitute instead' echo '#define NObcopy' >>$ACONF fi - $RM _autotst.$O _autotst + $RM _autotst.$O _autotst$EXE fi test -f /bin/test && echo "#define GOT_bin_test" >>$ACONF @@ -1349,7 +1356,10 @@ openerr: envs=(char*)((nenv=nenviron)+diff); while(--diff) /* put in some colour */ sprintf(*nenviron++=envs,arg,diff),envs+=sizeof arg; - *(environ=nenv)="PATH=.";*nenviron=0;diff=argc; /* start doubling */ +#ifndef __CYGWIN__ + *(environ=nenv)="PATH=."; +#endif /* __CYGWIN__ */ + *nenviron=0;diff=argc; /* start doubling */ } if(MAX_ARGMEM/sizeof arg<=argc) /* we are satisfied */ { einfo=" /* soft limit */"; /* no reason to hog memory */ @@ -1443,7 +1453,7 @@ chmod 0755 lookfor if _autotst 2 3 >>$ACONF test $? != 0 || - lookfor sendmail || lookfor smail || lookfor mail #|| lookfor rmail + lookfor sendmail || lookfor smail || lookfor mail || lookfor ssmtp #|| lookfor rmail then : else diff -rup procmail-3.22.orig/src/cstdio.c procmail-3.22-7/src/cstdio.c --- procmail-3.22.orig/src/cstdio.c 2000-12-31 01:08:20.000000000 -0500 +++ procmail-3.22-7/src/cstdio.c 2002-08-19 10:16:26.000000000 -0400 @@ -120,7 +120,7 @@ void closerc P((void)) /* {while(pop } /* destroys buf2 */ int bopen(name)const char*const name; /* my fopen */ -{ rcbufp=rcbufend=0;rc=ropen(name,O_RDONLY,0); +{ rcbufp=rcbufend=0;rc=ropen(name,O_RDONLY|O_TEXT,0); if(rc>=0) { char*md;size_t len; /* if it's a relative name and an absolute $MAILDIR */ if(!strchr(dirsep,*name)&& diff -rup procmail-3.22.orig/src/foldinfo.c procmail-3.22-7/src/foldinfo.c --- procmail-3.22.orig/src/foldinfo.c 2001-09-11 00:57:32.000000000 -0400 +++ procmail-3.22-7/src/foldinfo.c 2002-08-19 10:16:16.000000000 -0400 @@ -266,7 +266,9 @@ keepgid: /* keep the gid from the p exit(EX_NOUSER); } else - { if(!(stbuf.st_mode&OVERRIDE_MASK)&& + { +#ifndef __CYGWIN__ + if(!(stbuf.st_mode&OVERRIDE_MASK)&& stbuf.st_mode&cumask& (accspooldir?~(mode_t)0:~(S_IRGRP|S_IWGRP))) /* hold back */ { static const char enfperm[]= @@ -275,6 +277,7 @@ keepgid: /* keep the gid from the p syslog(LOG_NOTICE,slogstr,enfperm,buf);setids(); chmod(buf,stbuf.st_mode&=~cumask); } +#endif /* __CYGWIN__ */ break; /* everything is just fine */ } } diff -rup procmail-3.22.orig/src/includes.h procmail-3.22-7/src/includes.h --- procmail-3.22.orig/src/includes.h 2001-09-11 00:58:03.000000000 -0400 +++ procmail-3.22-7/src/includes.h 2002-08-19 10:16:26.000000000 -0400 @@ -51,6 +51,10 @@ #include /* time() ctime() time_t */ #include /* fcntl() struct flock O_RDONLY O_WRONLY /* O_APPEND O_CREAT O_EXCL */ +#ifndef O_TEXT +#define O_TEXT 0 +#endif + #include /* getgrgid() struct group */ #include /* getpwuid() getpwnam() struct passwd */ #ifndef DIRENT_H_MISSING