]> git.eshelyaron.com Git - sweep.git/commitdiff
PORT: Explicitly export the symbols we need V9.1.14
authorJan Wielemaker <J.Wielemaker@vu.nl>
Fri, 11 Aug 2023 09:33:14 +0000 (11:33 +0200)
committerJan Wielemaker <J.Wielemaker@vu.nl>
Fri, 11 Aug 2023 09:33:44 +0000 (11:33 +0200)
By default, plugins are now compiled with hidden visibility for
internal symbols.

sweep.c

diff --git a/sweep.c b/sweep.c
index decb8208f7391395f41a1122707de690b3ed040c..3e8f1565bab9fca660d26d6b70f34f76a14f3f5f 100644 (file)
--- a/sweep.c
+++ b/sweep.c
 #include <stdio.h>
 #include <string.h>
 
-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);