From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 177F644643D for ; Fri, 16 Oct 2020 18:27:06 +0300 (MSK) From: Sergey Kaplun Date: Fri, 16 Oct 2020 18:26:34 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin , Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org For become symbols exportable at several building systems (namely mvsc, xedk, xb1) LuaJIT defines LUA_BUILD_AS_DLL at corresponding bat files. When this macro is defined, the definition of LUA_API macro depends on LUA_CORE and LUA_LIB macros (see luaconf.h). If defined(LUA_CORE) or defined(LUA_LIB) then LUA_API macro is defined as __declspec(dllexport). Otherwise, it defined as __declspec(dllimport). This patch adds definition of LUA_CORE macro at the top of lj_mapi.c file to make corresponding symbols exportable for systems described above. Follows up tarantool/tarantool#5187 --- src/lj_mapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lj_mapi.c b/src/lj_mapi.c index 13737e0..b2b35a1 100644 --- a/src/lj_mapi.c +++ b/src/lj_mapi.c @@ -5,6 +5,9 @@ ** Copyright (C) 2015-2019 IPONWEB Ltd. */ +#define lj_mapi_c +#define LUA_CORE + #include "lua.h" #include "lmisclib.h" -- 2.28.0