summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornpmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56>2010-09-26 15:42:35 +0000
committernpmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56>2010-09-26 15:42:35 +0000
commitd271c3861c2e8693e9acf000355900583f16c3db (patch)
treefdeb18007c807fcb33dc04177ec194cc9fba1262
parent796408e9c16620c2ef72b1c7ab404277222f000a (diff)
downloadlibproxy-d271c3861c2e8693e9acf000355900583f16c3db.tar.gz
(hopefully) make libmodman work on windows using mingw
git-svn-id: http://libproxy.googlecode.com/svn/trunk@759 c587cffe-e639-0410-9787-d7902ae8ed56
-rw-r--r--libmodman/module.hpp7
-rw-r--r--libmodman/module_manager.cpp3
2 files changed, 5 insertions, 5 deletions
diff --git a/libmodman/module.hpp b/libmodman/module.hpp
index 6335595..e144cff 100644
--- a/libmodman/module.hpp
+++ b/libmodman/module.hpp
@@ -26,10 +26,9 @@
#define MM_MODULE_BUILTIN
#endif
-#ifdef WIN32
+#ifdef _MSC_VER
#define __MM_DLL_EXPORT __declspec(dllexport)
#else
-#include <typeinfo>
#define __MM_DLL_EXPORT __attribute__ ((visibility("default")))
#endif
@@ -79,10 +78,10 @@ public:
template <class basetype, bool sngl=false>
class __MM_DLL_EXPORT extension : public base_extension {
public:
-#ifdef WIN32
+#ifdef _MSC_VER
static const char* base_type() { return __FUNCSIG__; }
#else
- static const char* base_type() { return typeid(basetype).name(); }
+ static const char* base_type() { return __PRETTY_FUNCTION__; }
#endif
static bool singleton() { return sngl; }
diff --git a/libmodman/module_manager.cpp b/libmodman/module_manager.cpp
index d395f4a..192f8c3 100644
--- a/libmodman/module_manager.cpp
+++ b/libmodman/module_manager.cpp
@@ -20,6 +20,7 @@
#include <algorithm> // For sort()
#include <sys/stat.h> // For stat()
#include <iostream>
+#include <typeinfo>
#ifdef WIN32
#include <windows.h>
@@ -42,7 +43,7 @@ using namespace libmodman;
#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) {