From 0690023235a48ead9f06ad21edf18e7f9e074258 Mon Sep 17 00:00:00 2001 From: Paul Sladen Date: Wed, 29 Jul 2009 07:11:29 +0100 Subject: [PATCH] AtsPluginProxy: use dlopen() based on !__WIN32__ --- AtsPluginProxy/AtsPluginProxy.cpp | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/AtsPluginProxy/AtsPluginProxy.cpp b/AtsPluginProxy/AtsPluginProxy.cpp index 7550d00..7446c1c 100644 --- a/AtsPluginProxy/AtsPluginProxy.cpp +++ b/AtsPluginProxy/AtsPluginProxy.cpp @@ -1,10 +1,30 @@ +#ifdef __WIN32__ #include "stdafx.h" +#else +#include +#include // wchar +#include +#define _stdcall +#define __stdcall +#define FARPROC void * +#define LPCWSTR wchar_t * +#define LPCSTR char * +// dlopen() equivalency +#define HMODULE void * +#define LoadLibraryW(x) NULL +#define LoadLibraryA(pathname) dlopen(pathname,RTLD_LAZY) +#define GetProcAddress(handle,function) dlsym(handle,function) +#define FreeLibrary(handle) dlclose(handle) +#define __declspec(x) +#endif + +#ifdef __WIN32__ // --- main --- BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { return TRUE; } +#endif // --- structures --- struct ATS_VEHICLESPEC { -- 1.6.0.4