From 4d6ce34dea7e31b822de92ef61a922afbcaf64a2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 25 Oct 2008 08:15:12 +0000 Subject: [PATCH] Apply James' patch git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7899 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/win32/filed/plugins/exchange-fd.c | 7 +++-- bacula/src/win32/filed/plugins/exchange-fd.h | 29 +++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/bacula/src/win32/filed/plugins/exchange-fd.c b/bacula/src/win32/filed/plugins/exchange-fd.c index a2e3fa4060..8ad7f09d41 100644 --- a/bacula/src/win32/filed/plugins/exchange-fd.c +++ b/bacula/src/win32/filed/plugins/exchange-fd.c @@ -117,7 +117,7 @@ splitString(char *string, char split, int maxParts, int *count) return RetVal; } -bRC DLLEXPORT +bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, pInfo **pinfo, pFuncs **pfuncs) { bRC retval; @@ -134,14 +134,14 @@ loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, pInfo **pinfo, pFuncs **pfuncs) return retval; } -bRC DLLEXPORT +bRC DLL_IMP_EXP unloadPlugin() { return bRC_OK; } } - +/* void * b_malloc(const char *file, int lone, size_t size) { @@ -153,6 +153,7 @@ sm_malloc(const char *file, int lone, size_t size) { return NULL; } +*/ static bRC newPlugin(bpContext *ctx) { diff --git a/bacula/src/win32/filed/plugins/exchange-fd.h b/bacula/src/win32/filed/plugins/exchange-fd.h index 269df52161..aca569cc33 100644 --- a/bacula/src/win32/filed/plugins/exchange-fd.h +++ b/bacula/src/win32/filed/plugins/exchange-fd.h @@ -32,6 +32,16 @@ #ifndef _EXCHANGE_FD_H #define _EXCHANGE_FD_H +#define BUILD_PLUGIN + +#if defined(BUILDING_DLL) +# define DLL_IMP_EXP __declspec(dllexport) +#elif defined(USING_DLL) +# define DLL_IMP_EXP __declspec(dllimport) +#else +# define DLL_IMP_EXP +#endif + #if defined(HAVE_WIN32) #if defined(HAVE_MINGW) #include "mingwconfig.h" @@ -43,14 +53,6 @@ #endif #define __CONFIG_H -#if defined(BUILDING_DLL) -# define DLL_IMP_EXP _declspec(dllexport) -#elif defined(USING_DLL) -# define DLL_IMP_EXP _declspec(dllimport) -#else -# define DLL_IMP_EXP -#endif - enum { /* Keep M_ABORT=1 for dlist.h */ M_ABORT = 1, /* MUST abort immediately */ @@ -71,12 +73,16 @@ enum { M_VOLMGMT /* Volume management messages */ }; +#define FT_REG 3 +#define FT_DIREND 5 #define _REENTRANT 1 #define _THREAD_SAFE 1 #define _POSIX_PTHREAD_SEMANTICS 1 +#include + #include #include #include @@ -89,6 +95,11 @@ enum { #include #include "win32/compat/compat.h" #include "bc_types.h" + +typedef int64_t boffset_t; +//#define bstrdup(str) strcpy((char *)bmalloc(strlen((str))+1),(str)) +#define bstrdup(str) strdup(str) + #include "fd_plugins.h" #include "api.h" @@ -102,8 +113,6 @@ enum { #define EXCHANGE_PLUGIN_VERSION 1 -#define DLLEXPORT __declspec(dllexport) - #define JOB_TYPE_BACKUP 1 #define JOB_TYPE_RESTORE 2 -- 2.39.5