Polipo on MingW

Gisle Vanem <[email protected]>
Newsgroups gmane.comp.web.polipo.user
Message-ID <[email protected]>
I got the sources from the Git-repo today, make a quick MingW
makefile, patched only one place in diskcache.c, configured polipo.conf 
and ran it. I used lynx for testing. And I must say I'm pretty amased of 
how easy it was to build and run using MingW. Kudos to the folks who 
have made this possible!

Anyway, I only needed to patch this:

diff -u3 -Hb Git-latest\diskcache.c .\diskcache.c
--- Git-latest\diskcache.c      Thu Mar 31 17:13:34 2011
+++ .\diskcache.c       Thu Mar 31 19:26:12 2011
@@ -128,9 +128,15 @@
     if(!root || root->length == 0)
         return 0;

+#ifdef WIN32  /* Require "x:/" */
+    if(!isalpha(root->string[0]) || root->string[1] != ':') {
+        return -2;
+    }
+#else
     if(root->string[0] != '/') {
         return -2;
     }
+#endif

     rc = stat(root->string, &ss);
     if(rc < 0)
diff -u3 -Hb Git-latest\polipo.h .\polipo.h
--- Git-latest\polipo.h Thu Mar 31 17:13:34 2011
+++ .\polipo.h  Thu Mar 31 19:27:26 2011
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
+#include <ctype.h>
 #include <assert.h>
 #include <unistd.h>
 #include <fcntl.h>

-------------------

But I some problems that should be fixed IMHO:
* -DHAVE_REGEX is required. Otherwise NO_FORBIDDEN gets
  defined and that causes 'tunnelIsMatched()' to be missing.

* The hacks specifying the ~/polito dirs should be improved. Comments
  welcome. We cannot safely assume that every Windows user has a $HOME.

I have put my effort on my web-page here:
  http://home.broadpark.no/~gvanem/misc/#polipo-mingw

--gv



------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.