Forwarding with permission from the author.
Since I don't run Windows, could somebody please make sure that this
doesn't break the current Mingw(32) support?
Thanks,
-- Juliusz
--- Begin Message ---
Hello,
I have just succeeded in compiling polipo for Windows 64-bit using the
mingw64 compiler.
However, the patches below were needed to get it working.
In short I addressed these issues:
- __MINGW32_VERSION is not defined under mingw64
- mingw_gettimeofday is already defined under mingw64
- Makefile was installing polipo instead of polipo.exe in bin
- for some reason install-info failed so I had to skip it
Maybe you might consider implementing these patches.
Regards
Brecht Sanders
patch -ulbf polipo.h << EOF
--- polipo.h 2010-02-01 00:13:20 +0100
+++ polipo.h 2011-12-01 15:30:38 +0100
@@ -28,3 +28,3 @@
-#ifdef __MINGW32_VERSION
+#if defined(__MINGW32__)
#define MINGW
EOF
patch -ulbf mingw.h << EOF
--- mingw.h 2010-02-01 00:13:20 +0100
+++ mingw.h 2011-12-01 21:32:34 +0100
@@ -93,3 +93,5 @@
#define inet_aton(x, y) mingw_inet_aton(x, y)
+#ifndef __MINGW64__
#define gettimeofday(x, y) mingw_gettimeofday(x, y)
+#endif
#define stat(x, y) mingw_stat(x, y)
@@ -104,3 +106,5 @@
int mingw_inet_aton(const char *, struct in_addr *);
+#ifndef __MINGW64__
int mingw_gettimeofday(struct timeval *, char *);
+#endif
int mingw_poll(struct pollfd *, unsigned int, int);
EOF
patch -ulbf mingw.c << EOF
--- mingw.c 2010-02-01 00:13:20 +0100
+++ mingw.c 2011-12-01 21:36:16 +0100
@@ -155,4 +155,5 @@
}
+#ifndef __MINGW64__
int
mingw_gettimeofday(struct timeval *tv, char *tz)
@@ -183,4 +184,5 @@
return 0;
}
+#endif
int mingw_poll(struct pollfd *fds, unsigned int nfds, int timo)
EOF
patch -ulbf event.h << EOF
--- event.h 2010-02-01 00:13:20 +0100
+++ event.h 2011-12-01 21:34:42 +0100
@@ -22,2 +22,5 @@
+#ifdef __MINGW64__
+typedef uintptr_t sigset_t;
+#endif
extern struct timeval current_time;
EOF
mv Makefile Makefile.bak
sed -e "s/\(cp -f polipo\) /\1.exe /; s/\(install-info
--info-dir=\$(TARGET)\$(INFODIR) polipo.info\)/#\1/" Makefile.bak > Makefile
make CC=gcc EXE=.exe EXTRA_DEFINES=-DHAVE_REGEX LDLIBS="-Wl,--as-needed
-lws2_32 -lregex -s"
--- End Message ---
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users