Windows DLLs: add #ifdefery to turn off DLL import of libffi when building statically.

parent 158e7136
......@@ -41,7 +41,7 @@ diff -Nur libffi-3.0.8/include/ffi.h.in dllize-3.0.8/include/ffi.h.in
#define @TARGET@
#endif
+#if @LIBFFI_DLL@
+#if @LIBFFI_DLL@ && !defined(LIBFFI_NOT_DLL)
+#ifdef DLL_EXPORT
+#define __FFI_DECLSPEC __declspec(__dllexport__)
+#else
......
......@@ -27,6 +27,13 @@
#include <errno.h>
#endif
// When building the RTS in the non-dyn way on Windows, we don't
// want declspec(__dllimport__) on the front of function prototypes
// from libffi.
#if defined(mingw32_HOST_OS) && !defined(__PIC__)
# define LIBFFI_NOT_DLL
#endif
#include "ffi.h"
/* --------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment