Version: 0.87.4v1 By: Brandon Long (blong@fiction.net) Cygwin Win32 Port ============================================ This is a very ALPHA port. I haven't tested that many features, so use at your own risk. This patch allows mutt to compile and run under Cygnus' Cygwin32 port of the GNU tools to Win32 (95/NT), available from http://www.cygnus.com/misc/gnu-win32/ There are three major issues with this port: 1) getpwuid is not yet supported as of B18 of cygwin, so I fill in the data based on the env vars USERNAME and HOME, and use EXECSHELL for the shell (EXECSHELL is either /bin/sh or set by --with-execshell at configure time). Realname is left blank. 2) links don't work. lstat() is just a stub function, and there is no way with stat() to view the number of links a file has, so mutt's nfs safe dotlocking won't work. I don't believe any of the other locking works either, so there is NO LOCKING in this port of mutt. Use at your own risk. 3) end of line is CRLF. The cygwin tools differentiate between text and binary files by translating CRLF to LF. This forces mutt to decide between working around the problems in letting it to the translation, or understanding both CRLF and LF as end of line. I believe that it would be easier to make mutt understand CRLF as end of line, and have done so in the pager, the place which most obviously had this problem. The problem I ran into with CRLF to LF translation was the pager's comparison of the offset to the stat'd size of the file. The offset is without CR characters, so it was never equal to the size of the file. Compiling/Installing -------------------- This was done using B18 of the cygwin tools. I expect it should work with later versions when available. I compiled slang 0.99-38 by adding a #include to src/slutty.c and using configure to make it for "unix". This is because the curses emulation is not compiled by default with NT/Dos compiles. I may have had to hack config.h some to make things compile, this is left as an exercise to the reader. Apply the mutt patch to the source, and configure with: ./configure --with-slang=/libs/slang --with-rx --with-homespool=mailbox --disable-fcntl Obviously, point to wherever your have slang installed and wherever you want your home mailbox to be. You will need to set your $HOME env var to the location of your home directory, it will need to be on an NTFS or other drive which supports long filenames (ie, for .muttrc). Assuming you can compile something with cygwin, mutt should compile at this point. (Remember to set your GCC_EXEC_PREFIX and/or C_INCLUDE_PATH vars as needed.) I had nothing but trouble getting a viable termcap/terminfo stuff, possibly because of how I compiled slang. I eventually got it to work by explicitly setting my TERMCAP env var to: :am:bs:eo:mi:ms:ut:xn:xo:Co#8:co#80:it#8:li#25:pa#64:&7=^Z:@7=\E[4~:AB=\E[4%p1%dm:AF=\E[3%p1%dm:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:IC=\E[%d@:K2=\E[G:S2=\E[11m:S3=\E[10m:Sb=\E[%+(m:Sf=\E[%+^^m:ac=`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~q\304r\362s_t\303u\264v\301w\302x\263y\371z\372{\373|\374}\375~\376.\031-\030\054\021+^P0\333:ae=\E[10m:al=\E[L:as=\E[11m:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:do=^J:ei=\E[4l:ho=\E[H:ic=\E[@:im=\E[4h:k1=\E[[A:k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\E[B:kh=\E[1~:kl=\E[D:kr=\E[C:ku=\E[A:le=^H:mb=\E[5m:md=\E[1m:me=\E[0;10m:mr=\E[7m:nd=\E[C:nw=^M^J:op=\E[37;40m:r1=\Ec:rc=\E8:..sa=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p8%t;11%;%?%p9%t;11%;m:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:u6=\E[%d;%dR:u7=\E[6n:u8=\E[?6c:u9=\E[c:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l: Also, setting this TERMCAP variable will cause vim for NT to not work, as it attempts to use it to display. Versions ------------- 0.83v1 - First Version - Comment out USE_DOTLOCK - Pager doesn't work right 0.87.4v1 - A proper patch, #ifdef all CYGWIN specific stuff, and comment changes. Also looked at Duncan Sargent's OS/2 patch to fix the pager to correctly handle CRLF as EOL Known Bugs ----------- - I haven't tried sending mail yet, so I don't think it'll work without some additional work, not to mention you have to find a sendmail for NT. - the NT console seems to get really confused after the app quits, such that stuff that was on screen before mutt is invoked will start showing up in the "blank" spaces from additional commands. If you see it, you'll understand what I mean.