File libproxy-0.4.6-windows.patch of Package mingw64-libproxy
--- libproxy-0.4.6/CMakeLists.txt 2010-09-01 22:23:34.000000000 +0200
+++ libproxy-0.4.6/CMakeLists.txt 2011-03-07 23:25:17.813106764 +0100
@@ -27,7 +27,7 @@
### Subdirectories
# Conditionally build bundled libmodman
option(FORCE_SYSTEM_LIBMODMAN "Force using system libmodman" OFF)
-find_package(libmodman QUIET)
+find_package(libmodman)
if(LIBMODMAN_FOUND)
if("${LIBMODMAN_VERSION_MAJOR}" STREQUAL "2")
message(STATUS "Building with system libmodman")
--- libproxy-0.4.6/libmodman/module.hpp 2010-09-01 22:23:34.000000000 +0200
+++ libproxy-0.4.6/libmodman/module.hpp 2011-03-07 22:58:44.487107538 +0100
@@ -27,6 +27,9 @@
#endif
#ifdef WIN32
+#ifdef __MINGW32__
+#include <typeinfo>
+#endif
#define __MM_DLL_EXPORT __declspec(dllexport)
#else
#include <typeinfo>
@@ -79,7 +82,7 @@
template <class basetype, bool sngl=false>
class __MM_DLL_EXPORT extension : public base_extension {
public:
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
static const char* base_type() { return __FUNCSIG__; }
#else
static const char* base_type() { return typeid(basetype).name(); }
--- libproxy-0.4.6/libmodman/module_manager.cpp 2010-09-01 22:23:34.000000000 +0200
+++ libproxy-0.4.6/libmodman/module_manager.cpp 2011-03-07 23:10:25.566107192 +0100
@@ -20,6 +20,7 @@
#include <algorithm> // For sort()
#include <sys/stat.h> // For stat()
#include <iostream>
+#include <string>
#ifdef WIN32
#include <windows.h>
@@ -42,7 +43,7 @@
#define pdlopenl(filename) LoadLibraryEx(filename, NULL, DONT_RESOLVE_DLL_REFERENCES)
#define pdlclose(module) FreeLibrary((pdlmtype) module)
static void* pdlsym(pdlmtype mod, string sym) {
- return GetProcAddress(mod, sym.c_str());
+ return (void *)GetProcAddress(mod, sym.c_str());
}
static pdlmtype pdlreopen(const char* filename, pdlmtype module) {
--- libproxy-0.4.6/libmodman/test/main.cpp 2010-09-01 22:23:34.000000000 +0200
+++ libproxy-0.4.6/libmodman/test/main.cpp 2011-03-07 23:11:25.489107632 +0100
@@ -32,7 +32,7 @@
module_manager mm;
#ifdef WIN32
#ifdef SYMB
- void* symb = recv;
+ void* symb = (void *)recv;
#endif
#endif