From 904d779d06bd51f3a03d93a4d5552910151ae83c Mon Sep 17 00:00:00 2001 From: "Asanka C. Herath" Date: Tue, 23 Nov 2010 01:58:28 -0500 Subject: [PATCH] Windows: Support building roken as a DLL --- lib/roken/roken.h.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index 7d5d65794..d65868880 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -43,11 +43,18 @@ #ifndef ROKEN_LIB_FUNCTION #ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl +# define ROKEN_LIB_CALL __cdecl +# ifdef ROKEN_LIB_DYNAMIC +# define ROKEN_LIB_FUNCTION __declspec(dllimport) +# define ROKEN_LIB_VARIABLE __declspec(dllimport) +# else +# define ROKEN_LIB_FUNCTION +# define ROKEN_LIB_VARIABLE +# endif #else #define ROKEN_LIB_FUNCTION #define ROKEN_LIB_CALL +#define ROKEN_LIB_VARIABLE #endif #endif