From: Jan Wielemaker Date: Fri, 11 Aug 2023 09:33:14 +0000 (+0200) Subject: PORT: Explicitly export the symbols we need X-Git-Tag: V9.1.14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=197a0ef3e2a0a726c8587af97d0b688a17c0c65a;p=sweep.git PORT: Explicitly export the symbols we need By default, plugins are now compiled with hidden visibility for internal symbols. --- diff --git a/sweep.c b/sweep.c index decb820..3e8f156 100644 --- a/sweep.c +++ b/sweep.c @@ -37,7 +37,15 @@ #include #include -int plugin_is_GPL_compatible; +#if HAVE_DECLSPEC +#define EXPORT __declspec(dllexport) +#elif HAVE_VISIBILITY_ATTRIBUTE +#define EXPORT __attribute__((visibility("default"))) +#else +#define EXPORT +#endif + +EXPORT int plugin_is_GPL_compatible; struct sweep_env { term_t output_term; @@ -618,7 +626,7 @@ static void provide(emacs_env *env, const char *feature) { env->funcall(env, Qprovide, 1, (emacs_value[]){Qfeat}); } -int +EXPORT int emacs_module_init (struct emacs_runtime *runtime) { emacs_env *env = runtime->get_environment (runtime);