[imapfilter-devel] Patch for cygwin

Lefteris Chatzibarbas lefcha at hellug.gr
Thu Apr 29 11:55:39 EEST 2004


On Thu, Apr 29, 2004 at 10:20:49AM +1000, Gautam Gopalakrishnan wrote:
> Hello,
> 
> I'm attaching a patch so that imapfilter builds on cygwin (quite a recent
> release). Had to patch imapfilter.h and the config script.
> 
> Please let me know what you think.

Thanks for sending the patch and information on how imapfilter builds on
cygwin.

> diff -rc imapfilter-0.9.6/config imapfilter-0.9.6-new/config
> *** imapfilter-0.9.6/config	Mon Feb  9 08:45:11 2004
> --- imapfilter-0.9.6-new/config	Wed Apr 28 11:39:34 2004
> ***************
> *** 166,171 ****
> --- 166,177 ----
>     cflags="-O"
>   fi
  
> ! all: \$(BIN)
> ! 
> ! \$(BIN): \$(OBJ)
> ! EOF

I'm changing this in the Makefile, because it's more correct this way.

Thus, on cygwin, one could also do a:

  make BIN=imapfilter.exe

... and build without problems (or not?).

> ! if [ $CYGWIN = 0 ]; then
> ! 	echo "	\$(CC) \$(LDFLAGS) -o \$(BIN) \$(OBJ) \$(LIBS)" >> Makefile
> ! else
> ! 	echo "	\$(CC) \$(LIBS) \$(LDFLAGS) -o \$(BIN) \$(OBJ)" >> Makefile
> ! fi

Yes, I already changed this to the 2nd form in imapfilter 1.0 (beta) (see
previous threads).

> diff -rc imapfilter-0.9.6/imapfilter.h imapfilter-0.9.6-new/imapfilter.h
> *** imapfilter-0.9.6/imapfilter.h	Mon Feb  9 08:45:01 2004
> --- imapfilter-0.9.6-new/imapfilter.h	Wed Apr 28 11:39:34 2004
> ***************
> *** 14,19 ****
> --- 14,28 ----
>   #endif
>   
>   
> + /* 
> + 	Cygwin blotch
> + 	2048 is the value in limits.h in cygwin
> +  */
> + #ifndef LINE_MAX
> + #define LINE_MAX 2048
> + #endif

Cygwin doesn't define LINE_MAX inside <limits.h> as the POSIX standard
describes?




More information about the Imapfilter-devel mailing list